a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 banishing cards for a special summon

View previous topic View next topic Go down 
AuthorMessage
HurahItsHerald




Member Title : HeraldIsHereHoney
Posts : 15
Join date : 2015-08-25

PostSubject: banishing cards for a special summon   Tue Sep 08, 2015 9:07 am

Ive been wrecking my brain with a simple effect which is so hard for me to get it right Question


heres the monster effect part :

Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) in Attack Position by banishing cards from your Graveyard equal to this card's Level, including at least 1 "Volcano" card.

btw, its a level 2 monster i want to summon, so that means :
2 cards needs to be banished from my grave to sp summon it


^
those 2 cards can be ANY cards , but 1 of those 2 cards MUST be a "Volcano" card , so that means :

1 "Volcano" card + ANY other card
OR :

1 "Volcano" card + 1 other "Volcano" card

but it CANT be : Mad

1 card + any other card
1 "Volcano" card + the same "Volcano" card which was all ready targeted =
whats wrong with this script is targeting the same card twice causing only it to get banished , instead of 2 cards

right now with my script i can banish 1 "Volcano" card and 1 card , except the problem is
i can select the "Volcano" card in my grave twice , that causes only 1 card to be banished cuz i can target the same "Volcano" card twice

heres my script for that effect :

--special summon

local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58542,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_SPSUM_PARAM+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetTargetRange(POS_FACEUP_ATTACK,0)
e3:SetCondition(c58542.spcon)
e3:SetOperation(c58542.spop)
c:RegisterEffect(e3)


function c58542.spfilter(c)
return c:IsAbleToRemoveAsCost()
end
function c58542.spfilter2(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x904)
end
function c58542.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c58542.spfilter,c:GetControler(),LOCATION_GRAVE,0,c:GetLevel()-1,nil)
and Duel.IsExistingMatchingCard(c58542.spfilter2,c:GetControler(),LOCATION_GRAVE,0,1,nil)
end
function c58542.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c58542.spfilter2,c:GetControler(),LOCATION_GRAVE,0,1,1,nil)
local lv=e:GetHandler():GetLevel()
local lv=lv-1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c58542.spfilter,tp,LOCATION_GRAVE,0,lv,lv,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end

also , i cant summon a level 1 monster probably because of

Quote :
c:GetLevel()-1,nil)

and
Quote :
local lv=lv-1


1-1 = 0 No

extra info :

aux.Stringid(58542,0)) ==”Special Summon”
0x904 ==”Volcano”

i all ready did most of the script , so maybe someone can tell me what i can add to fix it or maybe what lines to remove to fix it ?

this is a standard for all my custom monsters, so if some one can help me fix this,
nearly all my cards will be complete

thank you in advance bounce
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: banishing cards for a special summon   Wed Sep 09, 2015 12:00 am

There is a way to banish cards simultaneously for (I believe) a card called the beginning of the end. Maybe check that card's script. In that way, you can't pick the same card twice without un-highlighting (deselecting w/e you wanna call it) it.

But I do have 2 questions or things for you to consider. 


You're banishing any card(s), how do you plan to get levels out of spells and traps?
And why can't you just banish 1 "volcano" monster that's equal to its level? Considering the wording, banishing just 1 "volcano" monster equal to its level should suffice. And then the game should give you a message that the requirements have been met, select yes to continue banishing or something which I could see as a problem in decks that love banishing monsters from the graveyard.
Back to top Go down
View user profile
HurahItsHerald




Member Title : HeraldIsHereHoney
Posts : 15
Join date : 2015-08-25

PostSubject: Re: banishing cards for a special summon   Wed Sep 09, 2015 9:55 am

Quote :
how do you plan to get levels out of spells and traps?

i was gonna just use this in spells/traps scripts:

function c38171.cfilter(c)
    return c:IsAbleToRemoveAsCost()
end
function c38171.cfilter2(c)
    return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x904)
end
if chk==0 then return Duel.IsExistingMatchingCard(c38171.cfilter,tp,LOCATION_GRAVE,0,5,nil) end
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
    local g=Duel.SelectMatchingCard(tp,c38171.cfilter2,tp,LOCATION_GRAVE,0,5,5,nil)
    Duel.Remove(g,POS_FACEUP,REASON_COST)


where 5 is a different requirement for each spell

but then i found out you can also give spells/traps monster levels


so for each spell, i'll give a monster level and that level will represent the activation requirement, im also going to have to put lines of script on each spell to stop them from being able to be set or be summoned like a monster
something like "this card cannot be set or summoned in the monster zone"

btw, each volcano spell is worded like this,
"Activate this card by banishing this card from your hand and cards from your graveyard equal to this card's level, including at least 1 "volcano" card."
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: banishing cards for a special summon   Wed Sep 09, 2015 11:17 pm

I think you're going too far to accommodate spells and traps, I'd say just reword it to monsters. You changed the lv value for that script to 5, so now you're gonna banish 5 cards for the first filter and up to 5 for the 2nd :S. Alternatively, you can just word it as "banish X amount of cards from the graveyard, including at least 1 "volcano" monster"
Back to top Go down
View user profile
HurahItsHerald




Member Title : HeraldIsHereHoney
Posts : 15
Join date : 2015-08-25

PostSubject: Re: banishing cards for a special summon   Thu Sep 10, 2015 3:42 am

thank u for the advise , that makes sense but another user helped me solve it
with d heros dogmas script ,
hes vary good and was able to improvise from its script and combine it with mine ,

here take a look :
--special summon
    local e3=Effect.CreateEffect(c)
    e3:SetDescription(aux.Stringid(74542,0))
    e3:SetType(EFFECT_TYPE_FIELD)
    e3:SetCode(EFFECT_SPSUMMON_PROC)
    e3:SetProperty(EFFECT_FLAG_SPSUM_PARAM+EFFECT_FLAG_UNCOPYABLE)
    e3:SetRange(LOCATION_HAND)
    e3:SetTargetRange(POS_FACEUP_ATTACK,0)
    e3:SetCondition(c74542.spcon)
    e3:SetOperation(c74542.spop)

function c74542.spfilter(c)
    return c:IsAbleToRemoveAsCost()
end
function c74542.spcon(e,c)
    if c==nil then return true end
    local g=Duel.GetMatchingGroup(c74542.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
    local d=g:FilterCount(Card.IsSetCard,nil,0x904)
    local ct=g:GetCount()
    local lv=e:GetHandler():GetLevel()
    return Duel.GetLocationCount(c:GetControler(),LOCATION_GRAVE)>-lv-1 and d>0 and ct>lv-1
end
function c74542.spop(e,tp,eg,ep,ev,re,r,rp,c)
    local lv=e:GetHandler():GetLevel()
    local g=Duel.GetMatchingGroup(c74542.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
    local sg1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x904)
    g:RemoveCard(sg1:GetFirst())
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
    local sg2=g:Select(tp,lv-1,lv-1,nil)
    sg2:Merge(sg1)
    Duel.Remove(sg2,POS_FACEUP,REASON_COST)
end

i hope to get better wit scripting
Back to top Go down
View user profile
cane_63106

avatar


Member Title : D.D. Dragon Kaiser
Posts : 454
Join date : 2013-07-23
Location : St. Louis, MO

PostSubject: Re: banishing cards for a special summon   Fri Sep 11, 2015 2:18 am

Here you go. Edit what you need to.

--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100782003,0))
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_PROC)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(c100782003.spcon)
e4:SetOperation(c100782003.spop)
c:RegisterEffect(e4)
end
function c100782003.spfilter(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c100782003.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100782003.spfilter,c:GetControler(),LOCATION_GRAVE,0,c:GetLevel(),nil)
end
function c100782003.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=e:GetHandler():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100782003.spfilter,tp,LOCATION_GRAVE,0,lv,lv,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end

_________________
Now...you will feel my wrath and know your place! I activate DIMENSIONAL END!!!

Custom Card Duels
Back to top Go down
View user profile http:// https://www.youtube.com/user/cane63106/videos
Sponsored content





PostSubject: Re: banishing cards for a special summon   

Back to top Go down
 

banishing cards for a special summon

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Lesson 15: Special Summon-Only
» is there a deck that stops special summons?(nid help)
» [TCG] Dragons of Legend – German cards spoiled!
» Greed Quasar and monsters like this one
» Atlanteans and Mermails

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Requests-