KitoMP
Member Title : Ilune Warrior Posts : 20 Join date : 2014-10-26
| Subject: Final script errors Wed Jan 07, 2015 8:42 pm | |
| So guys, there's just two cards so my archtype (Mystical Warriors) will be done . I'll post on the "custom cards" section, but I need to fix two cards that are not working ... Help me, and you will have 30 new beautiful and powerful cards to use in your duels So, since now, I already thank Trixie, AoO and Stormwing for helping me get this project done. Thank you so much, guys. I never could finish this without your help and patience. Well, here are the two problematic cards. First Card"The Mystical Healing Tower" ID:99990030 Effect: "For each card sent from your Graveyard to your Deck: Gain 300 LP. If "Mystical Star Night" is face-up on the field, for each card sent from your Graveyard to your Deck: Return 1 card on the field to its owner's hand. You can only control 1 face-up "The Mystical Healing Tower"." What happens? The highlighted effect (of returning cards to hand) is not working. I can target the cards... I said cardS (the multiple targeting effect is working properly), but they are not returning to the owner's hand. Script:- Spoiler:
--The Mystical Healing Tower function c99990030.initial_effect(c) c:SetUniqueOnField(1,0,99990030) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --recover local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_TO_DECK) e2:SetOperation(c99990030.recovop) c:RegisterEffect(e2) --return hand local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_TO_DECK) e3:SetCondition(c99990030.condition) e3:SetTarget(c99990030.target) e3:SetOperation(c99990030.handop) c:RegisterEffect(e3) end function c99990030.filter(c,tp) return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetControler()==tp and c:GetPreviousControler()==tp end function c99990030.recovop(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(c99990030.filter,nil,tp) Duel.Recover(tp,ct*300,REASON_EFFECT) end function c99990030.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(99990019) end function c99990030.hanfilter(c,tp) return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetControler()==tp and c:GetPreviousControler()==tp end function c99990030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsAbleToHand() end if chk==0 then return true end local ct=eg:FilterCount(c99990030.hanfilter,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) end function c99990030.handop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tg then local g=tg:Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>0 then Duel.SendtoHand(tg,nil,REASON_EFFECT) end end end
Last Card"Raging Dragon Soul" ID:99990023 Effect: "Activate only during the Battle Phase. Target 1 "Mystical" Monster you control; equip this card to that target. It gains 300 ATK. If the equipped monster destroys an opponent's monster by battle: Destroy 1 Spell/Trap Card on the field. If the equipped monster is destroyed by battle and sent to the Graveyard: Shuffle it into the Deck. This card is destroyed during the End Phase." What happens? This card proved to be the most complicated of the entire archtype. It's a challenge... Even the most powerful card with the most effects was easy near this one. The entire highlighted effect is not working. It just doesn't work. That's all. Script:- Spoiler:
--raging dragon soul function c99990023.initial_effect(c) --equip local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(c99990023.eqcon) e1:SetTarget(c99990023.eqtarg) e1:SetOperation(c99990023.activate) c:RegisterEffect(e1) --self destroy local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetTarget(c99990023.destg) e2:SetOperation(c99990023.desop) c:RegisterEffect(e2) end function c99990023.eqcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_BATTLE end function c99990023.filter(c,e,tp) return c:IsFaceup() and c:IsSetCard(0x22b) end function c99990023.eqtarg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c99990023.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c99990023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,c99990023.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function c99990023.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) then return end local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) c:CancelToGrave() --atk local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(300) tc:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(c99990023.eqlimit) e2:SetReset(RESET_EVENT+0x1fe0000) c:RegisterEffect(e2) --destroy s/t local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(c99990023.descon2) e3:SetTarget(c99990023.destg2) e3:SetOperation(c99990023.desop2) c:RegisterEffect(e3) --shuffle back to deck local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetCode(EVENT_BATTLE_DESTROYED) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCondition(c99990023.shucond) e4:SetTarget(c99990023.shutg) e4:SetOperation(c99990023.shuop) c:RegisterEffect(e4) end end function c99990023.eqlimit(e,c) return c:IsSetCard(0x22b) end function c99990023.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) end function c99990023.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end end function c99990023.descon2(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst()==e:GetHandler():GetEquipTarget() end function c99990023.desfilter2(c) return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) end function c99990023.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and c99990023.desfilter2(chkc) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(c99990023.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,c99990023.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c99990023.desop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c99990023.shucond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:IsLocation(LOCATION_GRAVE) end function c99990023.shutg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() if chk==0 then return ec:IsAbleToDeck() end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) end function c99990023.shuop(e,tp,eg,ep,ev,re,r,rp) if ec:IsRelateToEffect(e) then Duel.SendtoDeck(ec,nil,0,REASON_EFFECT) Duel.ShuffleDeck(tp) end end
Once again, I thank everyone who helped me. And soon, the mystical blue magic will be present on this website |
|