Leet
Member Title : Knight Posts : 3 Join date : 2015-02-20
| Subject: Help with my first custom card Fri Feb 20, 2015 3:20 pm | |
| So I'm trying to code my first card ever but its not going so well :/ This is the card Everything is fine except for 2 things:
- I can't summon it with Polymerization, although Cyber Stein works (and for some reason when I use Fusion Reserve with it I can search any card in my deck xD).
- The immune effect and attack all monsters effect aren't working.
and this is the script - Quote :
- --Exa-Quetzalcoatl the Aztec Spirit of Destruction
function c501000020.initial_effect(c) c:SetUniqueOnField(1,0,501000020) --fusion material c:EnableReviveLimit() aux.AddFusionProcCode2(c,15023985,true)(c,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL.IsRace,RACE_MACHINE),1,true) --immune trap local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(c501000020.efilter) c:RegisterEffect(e1) end function c501000020.efilter(e,te) return te:IsActiveType(TYPE_TRAP) end --attack all local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetValue(1) c:RegisterEffect(e2) end I'm sure I did many things wrong, that's why I'm asking for help |
|
Leet
Member Title : Knight Posts : 3 Join date : 2015-02-20
| Subject: Re: Help with my first custom card Sun Feb 22, 2015 2:32 pm | |
| Ok I figured it out on my own - Spoiler:
--Exa-Quetzalcoatl the Aztec Spirit of Destruction function c99995597.initial_effect(c) c:SetUniqueOnField(1,0,99995597) --fusion material c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,15023985,c99995597.ffilter,1,true,true) --immune local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(c99995597.efilter) c:RegisterEffect(e1) --attack all local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetValue(1) c:RegisterEffect(e2) end function c99995597.ffilter(c) return c:IsRace(RACE_MACHINE) and not c:IsType(TYPE_EFFECT) end function c99995597.efilter(e,te) return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) end
Thanks guys, you were great help |
|