| | Please help me, I'm stuck ^^' | |
| Author | Message |
---|
AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Please help me, I'm stuck ^^' Sat May 31, 2014 5:11 pm | |
| I'm nearly done with the scripts of my very own archetype, but now I stuck with a card for a while. This Rank 1 Xyz monster can deatch 1 Xyz material, to target one monster that is on the field or in the graveyard or banished and gain lifepoints equal to the atk of the monster. This is what I've done so far: - Code:
-
function c900000018.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x3E8),1),2) c:EnableReviveLimit() --recover local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(900000018,0)) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c900000018.cost) e1:SetTarget(c900000018.target) e1:SetOperation(c900000018.operation) c:RegisterEffect(e1) end
function c900000018.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(900000018)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RegisterFlagEffect(900000018,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c900000018.filter(c,e,tp) return c:IsType(TYPE_MONSTER) and c:IsFaceup() end function c900000018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(c900000018.filter,e:GetHandler(),LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end return true end function c900000018.operation(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(c900000018.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,e:GetHandler():GetControler(),HINTMSG_FACEUP) local tc=dg:Select(e:GetHandler():GetControler(),1,1,nil) Duel.Recover(tp,tc:GetFirst():GetAttack(),REASON_EFFECT) end Mackpro tells me, that the parameter 5 in line 36 should be 'Card', but I don't know, what parameter I should replace with what. ^^' |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 29 Location : bundaberg qld australia
| Subject: Re: Please help me, I'm stuck ^^' Sun Jun 01, 2014 3:57 am | |
| here i have not tested but it should work you will have to change it a bit to match you effect this scripts eff is detach 1 xyz material from this card then target 1 face-up monster that is in either players grave field or banished except this card; gain lifepoints equal to the atk of the selected monster. hope it helps - Code:
-
function c900000018.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x3E8),1),2) c:EnableReviveLimit() --recover local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(900000018,0)) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c900000018.cost) e1:SetTarget(c900000018.target) e1:SetOperation(c900000018.operation) c:RegisterEffect(e1) end
function c900000018.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(900000018)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RegisterFlagEffect(900000018,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c900000018.filter(c,e) return c:IsType(TYPE_MONSTER) and c:IsFaceup() end function c900000018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(1-tp) and c900000018.filter(chkc) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(c900000018.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,c900000018.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,1,1,e:GetHandler()) end function c900000018.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Please help me, I'm stuck ^^' Sun Jun 01, 2014 1:24 pm | |
| Thank you, it worked |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 29 Location : bundaberg qld australia
| Subject: Re: Please help me, I'm stuck ^^' Sun Jun 01, 2014 2:06 pm | |
| |
| | | Sponsored content
| Subject: Re: Please help me, I'm stuck ^^' | |
| |
| | | | Please help me, I'm stuck ^^' | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest None Most users ever online was 270 on Sun Apr 11, 2021 4:35 pm |
Latest topics | » Goodbye allMon Aug 08, 2016 7:53 pm by Zenas» [PLEASE READ] [VERY IMPORTANT] MACKPRO REVIVALMon Aug 08, 2016 7:47 pm by Zenas» D.D. Dragons vs KozmosSun Jul 10, 2016 11:02 pm by cane_63106» Where's everyone?!Sat May 28, 2016 2:58 am by cane_63106» Mech Archetype (crappy it be, maybe you guys would like it)Sun May 15, 2016 1:11 pm by barti02» My Assassin ArchetypeSun May 15, 2016 1:10 pm by barti02» SO I have a "NEW ARCHETYPE THE "WolfPack"Sun May 15, 2016 12:35 pm by barti02» Fusion monster doesn't appear in extra deck? Sat Apr 30, 2016 9:02 pm by Marc1» Mackpro update 10/6/2015Sat Apr 02, 2016 6:36 pm by Hulkty» Bionicle Cards AKA Japanese Children's Cardgames on Swedish Toy RobotsSun Mar 06, 2016 9:37 am by Utso |
|