Marc1
Posts : 43 Join date : 2013-08-03
| Subject: Dimensional Hole & Dimensional Reborn Help Sat Aug 03, 2013 7:55 pm | |
| I tried coding these two cards but for some reason they are not working. Any clue where I went wrong? - Code:
-
--Dimensional Hole function c3040.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_Remove) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c3040.target) e1:SetOperation(c3040.activate) c:RegisterEffect(e1) end
function c3040.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_Remove,sg,sg:GetCount(),0,0) end
function c3040.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Remove(sg,REASON_EFFECT) end - Code:
-
--Dimensional Reborn function c3042.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c3042.target) e1:SetOperation(c3042.activate) c:RegisterEffect(e1) end
function c3042.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
function c3042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVE) and c3042.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c3042.filter,tp,LOCATION_REMOVE,LOCATION_REMOVE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c3042.filter,tp,LOCATION_REMOVE,LOCATION_REMOVE,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end
function c3042.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end
|
|
outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: Dimensional Hole & Dimensional Reborn Help Sun Aug 04, 2013 2:06 am | |
| can you say what the effects are thanks |
|
Marc1
Posts : 43 Join date : 2013-08-03
| Subject: Re: Dimensional Hole & Dimensional Reborn Help Sun Aug 04, 2013 3:47 am | |
| Sorry about that.
Dimensional Hole
Banish all monsters on the field.
Dimensional Reborn
Special summon 1 banished monster to your side of the field. |
|
cane_63106
Member Title : D.D. Dragon Kaiser Posts : 454 Join date : 2013-07-23 Location : St. Louis, MO
| Subject: Re: Dimensional Hole & Dimensional Reborn Help Mon Aug 05, 2013 3:39 am | |
| |
|
jackmoonward
Admin
Posts : 75 Join date : 2013-08-03 Age : 27 Location : Classified
| Subject: Re: Dimensional Hole & Dimensional Reborn Help Mon Aug 05, 2013 4:37 am | |
| The problem with Dimension Hole is this: Duel.Remove(sg,REASON_EFFECT) You need to tell it if you are banishing face-up or facedown. So like this instead; Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
Your problem with Dimension Reborn is this: local g=Duel.SelectTarget(tp,c3042.filter,tp,LOCATION_REMOVE,LOCATION_REMOVE,1,1,nil,e,tp)
The location you want is LOCATION_REMOVED not LOCATION_REMOVE
~Jack |
|
Marc1
Posts : 43 Join date : 2013-08-03
| Subject: Re: Dimensional Hole & Dimensional Reborn Help Mon Aug 05, 2013 2:51 pm | |
| They work now. Thank you! |
|
Sponsored content
| Subject: Re: Dimensional Hole & Dimensional Reborn Help | |
| |
|