| | Author | Message |
---|
TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Verify card stats Mon Sep 15, 2014 6:55 pm | |
| I was going back through my old cards and fixing their "errors" (in quotations because the effects work, just not as intended) and one "error" was that I couldn't get a face-down card's stats. Basically how Shaddoll falcon special summons a monster face-down, after which the card flips up to verify what it is then back down, and when you hover over it, you can see its name (have that already) and stats (I don't have that). Here's the code I have. - Code:
- Code:
-
function c60000007.initial_effect(c) c:SetUniqueOnField(1,0,60000007) --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCondition(c60000007.spcon) e1:SetTarget(c60000007.sptg) e1:SetOperation(c60000007.spop) c:RegisterEffect(e1) --Destroy opp monster local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c60000007.target) e2:SetOperation(c60000007.operation) c:RegisterEffect(e2) --EP des local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(60000007,0)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(c60000007.descon) e3:SetTarget(c60000007.destg) e3:SetOperation(c60000007.desop) c:RegisterEffect(e3) end function c60000007.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) end function c60000007.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c60000007.spfilter(c,e,tp) return c:IsCode(60000006) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end function c60000007.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstMatchingCard(c60000007.spfilter,tp,LOCATION_DECK,0,nil,e,tp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) Duel.ConfirmCards(1-tp,tc) end end function c60000007.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) or c:IsPosition(POS_FACEUP_DEFENCE) or c:IsPosition(POS_FACEDOWN_DEFENCE) and c:IsDestructable() end function c60000007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c60000007.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c60000007.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,c60000007.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c60000007.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) e:GetHandler():RegisterFlagEffect(60000007,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) end end function c60000007.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(60000007)~=0 end function c60000007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c60000007.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end
Of relevance: E1 effect, spcon through spop. |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Verify card stats Sun Sep 21, 2014 12:10 pm | |
| Can you please write the first effect of the card. If it is really that simmilar to Falcon you can take its first effect to 100% and change sth. in your filter. I am not sure, but maybe it's the fault of the sptg function as it is not simmilar of the one of Falcon (in case your card effect is that simmilar to Falcon's effect). |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Verify card stats Fri Sep 26, 2014 6:18 am | |
| You can only control 1 face-up "MLP- Pinkamena Diane Pie". If this card is removed from the field, special summon 1 "MLP- Pinkie Pie" from your deck in face-down defense position. Once per turn, during either player's turn: you can target 1 monster your opponent controls; destroy that target. During the end phase of the turn this effect was used: destroy 1 card you control.
The important part is in bold
I suppose it's not that big a deal since you can just hover over it and it'll show up at the side along with the stats (rather than in the little transparent box that shows up when you hover over a card). I almost don't care anymore, if you think it's a quick fix like adding 1 more line, then you can help. Otherwise you don't have to bother with this if you don't want to. |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Verify card stats Sun Sep 28, 2014 2:19 pm | |
| - Code:
-
function c60000007.initial_effect(c) c:SetUniqueOnField(1,0,60000007) --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCondition(c60000007.spcon) e1:SetTarget(c60000007.sptg) e1:SetOperation(c60000007.spop) c:RegisterEffect(e1) --Destroy opp monster local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c60000007.target) e2:SetOperation(c60000007.operation) c:RegisterEffect(e2) --EP des local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(60000007,0)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(c60000007.descon) e3:SetTarget(c60000007.destg) e3:SetOperation(c60000007.desop) c:RegisterEffect(e3) end function c60000007.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) end function c60000007.filter(c,e,tp) return c:IsCode(60000006) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) end function c60000007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c60000007.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c60000007.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c60000007.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c60000007.spop(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_FACEDOWN_DEFENCE) Duel.ConfirmCards(1-tp,tc) end end function c60000007.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) or c:IsPosition(POS_FACEUP_DEFENCE) or c:IsPosition(POS_FACEDOWN_DEFENCE) and c:IsDestructable() end function c60000007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c60000007.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c60000007.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,c60000007.filter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c60000007.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) e:GetHandler():RegisterFlagEffect(60000007,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) end end function c60000007.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(60000007)~=0 end function c60000007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c60000007.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end Ok, I just overworked it without testing, so if there are still problems I will have an closer look at it, after my Mackpro works again (crashing the whole time lol). Hope it workes^^' |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Verify card stats Thu Oct 02, 2014 2:43 am | |
| Alright, will check to see if it works Edit: No, it didn't. While play-testing, i kinda noticed another problem with the other card associated with this one. It SS a copy of this card from your hand, deck or graveyard but it doesn't let you pick from where. But it does SS them from the deck until there are none which is ideal. I'll just leave this card as is and worry about the other one. |
| | | Sponsored content
| Subject: Re: Verify card stats | |
| |
| | | |
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 |
|