Random |
| | Card Scripts | |
| | Author | Message |
---|
Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Card Scripts Sun Feb 22, 2015 5:45 pm | |
| Venom Grappler - Spoiler:
--Venom Grappler function c99995596.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(99995596,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCost(c99995596.cost) e1:SetTarget(c99995596.target) e1:SetOperation(c99995596.operation) c:RegisterEffect(e1) --add counter local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(99995596,0)) e2:SetCategory(CATEGORY_COUNTER) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c99995596.ttarget) e2:SetOperation(c99995596.ooperation) c:RegisterEffect(e2) end function c99995596.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) end function c99995596.filter(c) return c:GetCode()==54306223 and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) end function c99995596.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(c99995596.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function c99995596.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local tc=Duel.SelectMatchingCard(tp,c99995596.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end function c99995596.ttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x9,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x9,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x9,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function c99995596.ooperation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x9,1) then tc:AddCounter(0x9,1) end end
Exa-Quetazalcoatl the Aztec Spirit of Destruction - Spoiler:
--Exa-Quetzalcoatl the Aztec Spirit of Destruction function c99995597.initial_effect(c) c:SetUniqueOnField(1,0,99995597) --fusion material c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,15023985,c99995597.ffilter,1,true,true) --immune local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(c99995597.efilter) c:RegisterEffect(e1) --attack all local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetValue(1) c:RegisterEffect(e2) end function c99995597.ffilter(c) return c:IsRace(RACE_MACHINE) and not c:IsType(TYPE_EFFECT) end function c99995597.efilter(e,te) return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) end
Venom Lair - Spoiler:
--毒の隠れ家 function c700000034.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetOperation(c700000034.activate) c:RegisterEffect(e1) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(700000034,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(c700000034.condition) e1:SetTarget(c700000034.target) e1:SetOperation(c700000034.operation) c:RegisterEffect(e1) end function c700000034.cfilter(c) return c:IsCode(16067089) and c:IsAbleToHand() end function c700000034.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(c700000034.cfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(700000034,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end end function c700000034.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function c700000034.filter(c,e,sp) return c:IsSetCard(0x50) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function c700000034.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c700000034.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c700000034.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c700000034.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end
Spheroidite Ogre Grotto - Spoiler:
--Spheroidite Ogre Grotto function c99995599.initial_effect(c) --pendulum summon aux.AddPendulumProcedure(c) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(c99995599.filter) e1:SetValue(1) c:RegisterEffect(e1) --Activate local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e2) end function c99995599.filter(e,c) return c:IsType(TYPE_NORMAL) end
Feldspar Ogre Grotto - Spoiler:
--Feldspar Ogre Grotto function c99995594.initial_effect(c) --pendulum summon aux.AddPendulumProcedure(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(99995594,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) e2:SetTarget(c99995594.target) e2:SetOperation(c99995594.operation) c:RegisterEffect(e2) --spsummon local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_PZONE) e3:SetCountLimit(1) e3:SetTarget(c99995594.sptg) e3:SetOperation(c99995594.spop) c:RegisterEffect(e3) end function c99995594.filter1(c,tp) return c.material_count and Duel.IsExistingMatchingCard(c99995594.filter2,tp,LOCATION_DECK,0,1,nil,c) end function c99995594.filter2(c,fc) if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end for i=1,fc.material_count do if c:IsCode(fc.material[i]) and not c:IsType(TYPE_EFFECT) then return true end end return false end function c99995594.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c99995594.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end end function c99995594.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local cg=Duel.SelectMatchingCard(tp,c99995594.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp) if cg:GetCount()==0 then return end Duel.ConfirmCards(1-tp,cg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c99995594.filter2,tp,LOCATION_DECK,0,1,1,nil,cg:GetFirst()) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) local tc=g:GetFirst() end end function c99995594.ffilter1(c,e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) end function c99995594.ffilter2(c,e,tp,m,f,chkf) return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) end function c99995594.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local mg1=Duel.GetMatchingGroup(c99995594.ffilter1,tp,LOCATION_MZONE,0,nil,e) local res=Duel.IsExistingMatchingCard(c99995594.ffilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) if not res then local ce=Duel.GetChainMaterial(tp) if ce~=nil then local fgroup=ce:GetTarget() local mg2=fgroup(ce,e,tp) local mf=ce:GetValue() res=Duel.IsExistingMatchingCard(c99995594.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) end end return res end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function c99995594.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local mg1=Duel.GetMatchingGroup(c99995594.ffilter1,tp,LOCATION_MZONE,0,nil,e) local sg1=Duel.GetMatchingGroup(c99995594.ffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local mg2=nil local sg2=nil local ce=Duel.GetChainMaterial(tp) if ce~=nil then local fgroup=ce:GetTarget() mg2=fgroup(ce,e,tp) local mf=ce:GetValue() sg2=Duel.GetMatchingGroup(c99995594.ffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) end if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then local sg=sg1:Clone() if sg2 then sg:Merge(sg2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tg=sg:Select(tp,1,1,nil) local tc=tg:GetFirst() if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) tc:SetMaterial(mat1) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.BreakEffect() Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) else local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local fop=ce:GetOperation() fop(ce,e,tp,tc,mat2) end tc:CompleteProcedure() end end
Guardian Strinklos - Spoiler:
--Guardian Strinklos function c99995593.initial_effect(c) c:EnableReviveLimit() --cannot special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_HAND) e2:SetCondition(c99995593.spcon) e2:SetOperation(c99995593.spop) c:RegisterEffect(e2) --add equip local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(99995593,0)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCondition(c99995593.condition) e3:SetOperation(c99995593.operation) c:RegisterEffect(e3) end function c99995593.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end function c99995593.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) Duel.Remove(g,POS_FACEUP,REASON_COST) end function c99995593.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED) end function c99995593.cfilter(c) return c:IsFaceup() and c:IsCode(34022290) end function c99995593.filter(c,e) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end function c99995593.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c99995593.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function c99995593.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c99995593.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
Sword of the Blue Flame - Strinlos - Spoiler:
--Sword of the Blue Flame - Strinklos function c99995592.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(c99995592.eqtg) e1:SetOperation(c99995592.eqop) c: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(1) c:RegisterEffect(e2) --Atk up local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(500) c:RegisterEffect(e3) --battle indestructable local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_EQUIP) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetValue(1) c:RegisterEffect(e4) --search local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(99995592,0)) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetCode(EVENT_TO_GRAVE) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e5:SetCondition(c99995592.thcon) e5:SetTarget(c99995592.thtg) e5:SetOperation(c99995592.thop) c:RegisterEffect(e5) end function c99995592.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99995592.eqfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c99995592.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,c99995592.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function c99995592.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) end end function c99995592.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function c99995592.thfilter(c) return c:IsSetCard(0x52) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c99995592.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c99995592.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c99995592.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c99995592.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
OP Lady of the Lake - Spoiler:
--Lady of the Lake function c501000020.initial_effect(c) --synchro limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetValue(c501000020.synlimit) c:RegisterEffect(e1) --synchro material local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetValue(LOCATION_REMOVED) e2:SetCondition(c501000020.rmcon) c:RegisterEffect(e2) --spsummon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(501000020,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetTarget(c501000020.target) e3:SetOperation(c501000020.operation) c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(501000020,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_GRAVE) e4:SetTarget(c501000020.sptg) e4:SetOperation(c501000020.spop) c:RegisterEffect(e4) end function c501000020.synlimit(e,c) if not c then return false end return not c:IsRace(RACE_WARRIOR) end function c501000020.rmcon(e) return bit.band(e:GetHandler():GetReason(),REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO end function c501000020.filter(c,e,tp) return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c501000020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c501000020.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c501000020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c501000020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c501000020.operation(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 function c501000020.spfilter(c) return c:IsFaceup() and c:IsSetCard(0x107a) and c:GetLevel()==5 end function c501000020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c501000020.spfilter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c501000020.spfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(501000020,2)) Duel.SelectTarget(tp,c501000020.spfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c501000020.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<2 then return end local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(-1) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end
OP Noble Knight Brothers - Spoiler:
--Noble Knight Agravain function c501000021.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(501000021,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(c501000021.sptg) e1:SetOperation(c501000021.spop) c:RegisterEffect(e1) --ret&draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(501000021,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c501000021.drtg) e2:SetOperation(c501000021.drop) e2:SetCountLimit(1) c:RegisterEffect(e2) end function c501000021.spfilter(c,e,tp) return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c501000021.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c501000021.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c501000021.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end if ft>2 then ft=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c501000021.spfilter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) if g:GetCount()~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(c501000021.splimit) Duel.RegisterEffect(e1,tp) end function c501000021.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsSetCard(0x107a) end function c501000021.drfilter(c) return (c:IsSetCard(0x107a) or c:IsSetCard(0x207a)) and c:IsAbleToDeck() end function c501000021.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c501000021.drfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c501000021.drfilter,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c501000021.drfilter,tp,LOCATION_GRAVE,0,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c501000021.tgfilter(c,e) return not c:IsRelateToEffect(e) end function c501000021.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tg:IsExists(c501000021.tgfilter,1,nil,e) then return end Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end
Neo-Spacian Empty Tide - Spoiler:
--Neo-Spacian Empty Tide function c99995590.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c99995590.spcon) c:RegisterEffect(e1) --tutor local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(99995590,0)) e2:SetCategory(CATEGORY_TOHAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c99995590.target) e2:SetOperation(c99995590.activate) c:RegisterEffect(e2) end function c99995590.filter(c) return c:IsFaceup() and c:IsCode(89943723) and c:GetCode()~=99995590 end function c99995590.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c99995590.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function c99995590.ffilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() end function c99995590.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c99995590.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c99995590.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,c99995590.filter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function c99995590.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end
Ancient Gear Cannon - Spoiler:
--Ancient Gear Cannon function c99995592.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(99995592,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c99995592.cost) e1:SetTarget(c99995592.target) e1:SetOperation(c99995592.operation) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(c99995592.val) c:RegisterEffect(e2) end function c99995592.filte(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) end function c99995592.val(e,c) return Duel.GetMatchingGroupCount(c99995592.filte,c:GetControler(),LOCATION_MZONE,0,nil)*500 end function c99995592.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) end function c99995592.filter(c) return c:IsSetCard(0x7) and c:IsAbleToHand() end function c99995592.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c99995592.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c99995592.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c99995592.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
Ancient Gear Statue - Spoiler:
--Ancient Gear Statue function c99995593.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(99995593,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCost(c99995593.spcost) e1:SetTarget(c99995593.sptg) e1:SetOperation(c99995593.spop) c:RegisterEffect(e1) end function c99995593.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c99995593.filter(c,e,tp) return c:GetCode()~=99995593 and c:IsSetCard(0x7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER) end function c99995593.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c99995593.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function c99995593.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c99995593.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end
GB Promulius - Spoiler:
--Gladiator Beast Promulius function c99995591.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(99995591,0)) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c99995591.hspcon) e1:SetTarget(c99995591.hsptg) e1:SetOperation(c99995591.hspop) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(99995591,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(c99995591.spcon) e2:SetCost(c99995591.spcost) e2:SetTarget(c99995591.sptg) e2:SetOperation(c99995591.spop) c:RegisterEffect(e2) end function c99995591.hspcon(e,tp,eg,ep,ev,re,r,rp) local st=e:GetHandler():GetSummonType() return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) end function c99995591.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c99995591.hspop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end function c99995591.retcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() return tc:GetFlagEffect(99995591)>0 end function c99995591.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) end function c99995591.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end function c99995591.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToDeckAsCost() end Duel.SendtoDeck(c,nil,2,REASON_COST) end function c99995591.filter(c,e,tp) return c:IsSetCard(0x19) and not c:IsCode(99995591) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) end function c99995591.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c99995591.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c99995591.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c99995591.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) end end
Last edited by Atlus on Sat Jul 30, 2016 10:00 am; edited 3 times in total | |
| | | Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Re: Card Scripts Thu Mar 31, 2016 7:28 pm | |
| Blast Magician retrain - Spoiler:
--Blast Magician function c700000041.initial_effect(c) c:EnableCounterPermit(0x1) c:SetCounterLimit(0x1,7) --add counter local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e0:SetCode(EVENT_CHAINING) e0:SetRange(LOCATION_MZONE) e0:SetOperation(aux.chainreg) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetRange(LOCATION_MZONE) e1:SetOperation(c700000041.acop) c:RegisterEffect(e1) --attackup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(c700000041.attackup) c:RegisterEffect(e2) --search local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(700000041,0)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetTarget(c700000041.thtg) e3:SetOperation(c700000041.thop) c:RegisterEffect(e3) --prevent destruction local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DESTROY_REPLACE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetRange(LOCATION_MZONE) e4:SetTarget(c700000041.desreptg) e4:SetOperation(c700000041.desrepop) c:RegisterEffect(e4) end function c700000041.attackup(e,c) return c:GetCounter(0x1)*200 end function c700000041.acop(e,tp,eg,ep,ev,re,r,rp) if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(0x1,1) end end function c700000041.filter(c,cc,e,tp) return c:IsRace(RACE_SPELLCASTER) and not c:IsCode(700000041) and c:IsAbleToHand() and c:GetLevel()>0 and cc:IsCanRemoveCounter(tp,0x1,c:GetLevel(),REASON_COST) end function c700000041.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c700000041.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),e,tp) end local g=Duel.GetMatchingGroup(c700000041.filter,tp,LOCATION_DECK,0,nil,e:GetHandler(),e,tp) local lvt={} local tc=g:GetFirst() while tc do local tlv=tc:GetLevel() lvt[tlv]=tlv tc=g:GetNext() end local pc=1 for i=1,12 do if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end end lvt[pc]=nil Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(700000041,1)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) e:GetHandler():RemoveCounter(tp,0x1,lv,REASON_COST) e:SetLabel(lv) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c700000041.sfilter(c,lv,e,tp) return c:IsRace(RACE_SPELLCASTER) and not c:IsCode(700000041) and c:IsAbleToHand() and c:GetLevel()==lv end function c700000041.thop(e,tp,eg,ep,ev,re,r,rp) local lv=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c700000041.sfilter,tp,LOCATION_DECK,0,1,1,nil,lv) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c700000041.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) and Duel.IsCanRemoveCounter(tp,1,1,0x1,3,REASON_EFFECT) end return Duel.SelectYesNo(tp,aux.Stringid(700000041,0)) end function c700000041.desrepop(e,tp,eg,ep,ev,re,r,rp) Duel.RemoveCounter(tp,1,1,0x1,3,REASON_COST) end
Last edited by Atlus on Fri Jul 21, 2017 11:14 am; edited 1 time in total | |
| | | Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Re: Card Scripts Thu Jul 28, 2016 10:49 am | |
| Volcanic Barrier - Spoiler:
--Volcanic Barrier function c700000036.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --damage local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(700000036,0)) e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetTarget(c700000036.target) e2:SetOperation(c700000036.operation) c:RegisterEffect(e2) --search local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(700000036,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_TO_GRAVE) e3:SetTarget(c700000036.thtg) e3:SetOperation(c700000036.thop) c:RegisterEffect(e3) end function c700000036.filter(c) return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() end function c700000036.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c700000036.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c700000036.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,c700000036.filter,tp,LOCATION_GRAVE,0,1,1,nil) local atk=g:GetFirst():GetBaseAttack() Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function c700000036.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)~=0 then Duel.BreakEffect() Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) end end function c700000036.thfilter(c) return c:IsSetCard(0x32) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c700000036.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c700000036.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c700000036.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c700000036.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end
| |
| | | Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Re: Card Scripts Thu Aug 04, 2016 4:24 pm | |
| Ice Queen - Spoiler:
--Ice Queen function c700000038.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetCountLimit(1,700000038) e1:SetCondition(c700000038.spcon) e1:SetOperation(c700000038.spop) c:RegisterEffect(e1) --atk,pos limit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE,LOCATION_MZONE) e2:SetTarget(c700000038.target1) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_ACTIVATE) c:RegisterEffect(e3) local e4=e2:Clone() e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) c:RegisterEffect(e4) --add counter local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_COUNTER) e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetCode(EVENT_FREE_CHAIN) e5:SetCountLimit(1) e5:SetRange(LOCATION_MZONE) e5:SetTarget(c700000038.target) e5:SetOperation(c700000038.operation) c:RegisterEffect(e5) end function c700000038.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x15,3,REASON_COST) end function c700000038.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.RemoveCounter(tp,1,1,0x15,3,REASON_RULE) end function c700000038.target1(e,c) return c~=e:GetHandler() and c:GetCounter(0x15)~=0 end function c700000038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsCanAddCounter(0x15,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x15,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x15,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function c700000038.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x15,1) then tc:AddCounter(0x15,1) end end
| |
| | | Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Re: Card Scripts Thu Aug 18, 2016 7:41 am | |
| Gladiator Beast Paegnari - Spoiler:
--剣闘獣アウグストル function c700000040.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(700000040,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c700000040.hspcon) e1:SetTarget(c700000040.hsptg) e1:SetOperation(c700000040.hspop) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(700000040,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(c700000040.spcon) e2:SetCost(c700000040.spcost) e2:SetTarget(c700000040.sptg) e2:SetOperation(c700000040.spop) c:RegisterEffect(e2) end function c700000040.hspcon(e,tp,eg,ep,ev,re,r,rp) local st=e:GetHandler():GetSummonType() return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150) end function c700000040.hspfilter(c,e,tp) return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) end function c700000040.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c700000040.hspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c700000040.hspop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c700000040.hspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEUP_DEFENCE) tc:RegisterFlagEffect(700000040,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) local e12=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetCondition(c700000040.retcon) e1:SetOperation(c700000040.retop) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end end function c700000040.retcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() return tc:GetFlagEffect(700000040)>0 end function c700000040.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) end function c700000040.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end function c700000040.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToDeckAsCost() end Duel.SendtoDeck(c,nil,2,REASON_COST) end function c700000040.filter(c,e,tp) return c:IsSetCard(0x19) and not c:IsCode(700000040) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) end function c700000040.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c700000040.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c700000040.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c700000040.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+0x1ff0000,0,0) end end
| |
| | | Atlus Admin
Posts : 112 Join date : 2012-01-05 Age : 26
| Subject: Re: Card Scripts Thu Jul 13, 2017 11:56 am | |
| D-HERO Dusukutopia or Super Vehicroid Mobile Base 1 D HERO Fusion + 1 D HERO
GEM KNIGHT AQUAMARINE 1 GEM KNIGHT SAPPHIRE + 1 GEM KNIGHT
PREDAPLANT DRAGOSTAPELLA 1 FUSION + 1 DARK | |
| | | Sponsored content
| Subject: Re: Card Scripts | |
| |
| | | | Card Scripts | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |
|