|
| Need help with making cards based on Owner's Seal | |
| |
Author | Message |
---|
Giyuo
Member Title : Giyuo Posts : 24 Join date : 2015-04-09
| Subject: Re: Need help with making cards based on Owner's Seal Wed Apr 15, 2015 12:39 am | |
| I checked that card before. It had a line that said it used an effect that seemed to already be coded outside of the cards code. Going to look again. - Spoiler:
function c14507213.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCost(c14507213.cost) e1:SetTarget(c14507213.target) e1:SetOperation(c14507213.activate) c:RegisterEffect(e1) end function c14507213.filter(c) return c:IsFaceup() and c:IsCanBeSynchroMaterial() end function c14507213.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c14507213.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14507213.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c14507213.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c14507213.filter,tp,0,LOCATION_MZONE,1,1,nil) end function c14507213.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_MATERIAL) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end end
Not exactly sure what this does but seeing as how the target function specifies a number of monsters that need to be selected I still need to know how to remove the limit to how many can be selected |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Need help with making cards based on Owner's Seal Wed Apr 15, 2015 12:47 am | |
| The setcode is just stating they can be used as synchro material. It's an obscure setcode, hardly anything uses it, but percy had to make one SPECIFICALLY for this card.... probably. (maybe also child dragon and before that MPB blue impala)
In the last line of the target function you can just set the max to 5 I guess. Then edit as you want the target to check ownership of the cards you would use for the synchro material |
| | | Giyuo
Member Title : Giyuo Posts : 24 Join date : 2015-04-09
| Subject: Re: Need help with making cards based on Owner's Seal Wed Apr 15, 2015 1:14 am | |
| - Spoiler:
function c94634434.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1e0) e1:SetRange(LOCATION_MZONE) e1:SetTarget(c94634434.target) e1:SetOperation(c94634434.operation) c:RegisterEffect(e1) end
function c94634434.filter0(c,e,tp) return lv>0 and c:IsAbleToGrave()and c:GetOwner()==tp and c:GetLevel()and not c:IsType(TYPE_TUNER) end function c94634434.filter1(c,e,lv,tp) local tlv=c:GetLevel() return lv>0 and c:IsAbleToGrave()and c:GetOwner()==tp and c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c11047543.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+tlv) end function c94634434.exfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)and c:GetLevel()==lv and c:IsType(TYPE_SYNCHRO) end
function c94634434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(c94634434.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,1,9,nil,e,tp)and Duel.IsExistingTarget(c94634434.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g1=Duel.SelectTarget(tp,c94634434.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,1,9,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g2=Duel.SelectTarget(tp,c94634434.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,g1:GetFirst():GetLevel()) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,10,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
function c94634434.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc1=g:GetFirst() local tc2=g:GetNext() local sg=Duel.SelectMatchingCard(c11047543.exfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetLevel()+tc2:GetLevel()) if sg:GetCount()==0 then return end Duel.SendtoGrave(g,POS_FACEUP,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local ssg=sg:Select(tp,1,1,nil) Duel.SpecialSummon(ssg,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) end
Alright I'll see if I can't figure out how to use the Synchro Material. In the mean time though, any idea why this code doesn't work? ^ I've updated it to my most recent try but even though I think I've found all the inconsistencies i'm probably over looking something.
Last edited by Giyuo on Wed Apr 15, 2015 2:58 am; edited 3 times in total |
| | | Giyuo
Member Title : Giyuo Posts : 24 Join date : 2015-04-09
| Subject: Re: Need help with making cards based on Owner's Seal Wed Apr 15, 2015 1:50 am | |
| - Spoiler:
function c94634434.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c94634434.target) e1:SetOperation(c94634434.activate) c:RegisterEffect(e1) end function c94634434.filter(c) return c:IsFaceup() and c:IsCanBeSynchroMaterial() and c:GetOwner()==tp end
function c94634434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94634434.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c94634434.filter,tp,0,LOCATION_MZONE,1,5,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c94634434.filter,tp,0,LOCATION_MZONE,1,5,nil) end function c94634434.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_MATERIAL) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end end
I managed to break it XD. "Line 18 parameter 6 should be 'card'" But is this what it should look like? *Edit** Fixed the error. But it doesn't seem to work with the addition of "c:GetOwner()==tp" to the filter.... it was worth a try |
| | | Giyuo
Member Title : Giyuo Posts : 24 Join date : 2015-04-09
| Subject: Re: Need help with making cards based on Owner's Seal Thu Apr 16, 2015 12:17 pm | |
| Saw some more things wrong but still not working - Spoiler:
function c94634434.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1e0) e1:SetRange(LOCATION_MZONE) e1:SetTarget(c94634434.target) e1:SetOperation(c94634434.operation) c:RegisterEffect(e1) end
function c94634434.filter0(c,e,tp) return c:IsAbleToGrave()and c:IsFaceup() and c:GetOwner()==tp and c:IsType(TYPE_TUNER) and Duel.IsExistingTarget(c94634434.filter1,tp,0,LOCATION_MZONE,1,nil,e,tp,c:GetLevel()) end
function c94634434.filter1(c,e,tp,lv)--Where do I look to find where it finds the value of "lv"? local tlv=c:GetLevel() return tlv>0 and c:IsFaceup()and c:IsAbleToGrave()and c:GetOwner()==tp and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c94634434.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+tlv)
end
function c94634434.exfilter(c,e,tp,lv) return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)and c:GetLevel()==lv and c:IsType(TYPE_SYNCHRO) end
function c94634434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(c94634434.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g1=Duel.SelectTarget(tp,c94634434.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g2=Duel.SelectTarget(tp,c94634434.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,9,nil,e,tp,g1:GetFirst():GetLevel()) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,10,0)--not sure what last number is for Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
function c94634434.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc1=g:GetFirst() local tc2=g:GetNext() local sg=Duel.SelectMatchingCard(c94634434.exfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetLevel()+tc2:GetLevel()) if sg:GetCount()==0 then return end Duel.SendtoGrave(g,POS_FACEUP,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local ssg=sg:Select(tp,1,1,nil) Duel.SpecialSummon(ssg,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) end
|
| | | Giyuo
Member Title : Giyuo Posts : 24 Join date : 2015-04-09
| Subject: Re: Need help with making cards based on Owner's Seal Sat Apr 18, 2015 2:13 pm | |
| I looked into Ninjutsu Art Super Transformation and I want to get some understanding on why one of the filters reads as it does. function c90200789.spfilter(c,e,tp,lv) return c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not lv or c:IsLevelBelow(lv))end Why does it have "and" and "not" in parenthesis for the requirements of the card that is searched in the deck. I know it to need the card to be either equal or lower and it's saying it can only be higher. Not sure if there is a function that understands it's opposite day or what but could anyone plz explain? It might help me in making my card. - Spoiler:
function c90200789.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1c0) e1:SetTarget(c90200789.target) e1:SetOperation(c90200789.operation) c:RegisterEffect(e1) --Destroy local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetOperation(c90200789.desop) c:RegisterEffect(e2) end function c90200789.filter1(c,tp,slv) local lv1=c:GetLevel() return c:IsFaceup() and c:IsSetCard(0x2b) and lv1>0 and Duel.IsExistingTarget(c90200789.filter2,tp,0,LOCATION_MZONE,1,nil,lv1,slv) end function c90200789.filter2(c,lv1,slv) local lv2=c:GetLevel() return c:IsFaceup() and lv2>0 and lv1+lv2>=slv end function c90200789.spfilter(c,e,tp,lv) return c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not lv or c:IsLevelBelow(lv)) end function c90200789.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end local sg=Duel.GetMatchingGroup(c90200789.spfilter,tp,LOCATION_DECK,0,nil,e,tp) if chk==0 then if sg:GetCount()==0 then return false end local mg,mlv=sg:GetMinGroup(Card.GetLevel) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingTarget(c90200789.filter1,tp,LOCATION_MZONE,0,1,nil,tp,mlv) end local mg,mlv=sg:GetMinGroup(Card.GetLevel) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g1=Duel.SelectTarget(tp,c90200789.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp,mlv) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g2=Duel.SelectTarget(tp,c90200789.filter2,tp,0,LOCATION_MZONE,1,1,nil,g1:GetFirst():GetLevel(),mlv) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) end function c90200789.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=g:Filter(Card.IsRelateToEffect,nil,e) if tg:GetCount()==0 then return end Duel.SendtoGrave(tg,REASON_EFFECT) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=tg:GetFirst() local lv=0 if tc:IsLocation(LOCATION_GRAVE) then lv=lv+tc:GetLevel() end tc=tg:GetNext() if tc and tc:IsLocation(LOCATION_GRAVE) then lv=lv+tc:GetLevel() end if lv==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c90200789.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv) local tc=g:GetFirst() if tc then Duel.BreakEffect() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) c:SetCardTarget(tc) end end function c90200789.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end
|
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Need help with making cards based on Owner's Seal Mon Apr 20, 2015 2:08 am | |
| Idk why that one is written like that. and c:IsLevelBelow(lv) would've been good enough. Or maybe it's not working as it should in ygopro and it's letting you ss monsters that AREN'T the combined levels of the monsters as it should be, only lower. That's my guess. Ygopro is full of bugs and effects that are off, one example would be Brotherhood of the FF- Swallow, his actual effect is your opp cann't target YOUR FF monsters with their own card effects, whereas in ygopro it says (last I checked) your opp cannot target ANY FF monsters with card effects. I bet that's real fun in mirror matches, not being able to target your own horse prince or tiger king with your own tensen *sarcasm xD* |
| | | Sponsored content
| Subject: Re: Need help with making cards based on Owner's Seal | |
| |
| | | | Need help with making cards based on Owner's Seal | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests 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 |
|