diff --git a/MoonBurst cards.cdb b/MoonBurst cards.cdb new file mode 100644 index 0000000..a099d63 Binary files /dev/null and b/MoonBurst cards.cdb differ diff --git a/Script/c4242564.lua b/Script/c4242564.lua deleted file mode 100644 index b4d79cd..0000000 --- a/Script/c4242564.lua +++ /dev/null @@ -1,163 +0,0 @@ ---Lunar Phase Beast: Tiny Pony Moon Burst -function c4242564.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_PZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c4242564.efilter) - e1:SetValue(300) - c:RegisterEffect(e1) - --Def - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - e2:SetValue(300) - c:RegisterEffect(e2) - --spsummon proc - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242564,2)) - e3:SetCountLimit(1,42425641) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_PZONE) - e3:SetCondition(c4242564.condition) - e3:SetTarget(c4242564.target) - e3:SetOperation(c4242564.operation) - c:RegisterEffect(e3) - --death into scale - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242564,3)) - e4:SetCountLimit(1,42425643) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_DESTROYED) - e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetCondition(c4242564.pencon) - e4:SetTarget(c4242564.pentg) - e4:SetOperation(c4242564.penop) - c:RegisterEffect(e4) - --draw/replace - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(4242564,4)) - e5:SetCategory(CATEGORY_DRAW) - e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_BATTLE_DAMAGE) - e5:SetCondition(c4242564.condition2) - e5:SetOperation(c4242564.operation2) - c:RegisterEffect(e5) - - --If Death by archtype effect, sp summon - local e7=Effect.CreateEffect(c) - e7:SetDescription(aux.Stringid(4242564,1)) - e7:SetCountLimit(1,42425643) - e7:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e7:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e7:SetCode(EVENT_DESTROYED) - e7:SetCondition(c4242564.thcon) - e7:SetTarget(c4242564.thtg) - e7:SetOperation(c4242564.thop) - c:RegisterEffect(e7) -end ---If death by archtype effect, sp summon - -function c4242564.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return bit.band(c:GetReason(),0x41)==0x41 and re:GetOwner():IsSetCard(0x666) -end - -function c4242564.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_DECK) and chkc:IsControler(tp) and c4242564.filter(chkc) end -if chk==0 then return Duel.IsExistingMatchingCard(c4242564.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) -end -function c4242564.thop(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,c4242564.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end - - -function c4242564.efilter(e,c) - return c:IsSetCard(0x666) -end -function c4242564.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end -function c4242564.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end - - - -function c4242564.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+0x47e0000) - e1:SetValue(LOCATION_REMOVED) - c:RegisterEffect(e1,true) - end -end - - -function c4242564.pencon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) - and not e:GetHandler():IsLocation(LOCATION_REMOVED) -end -function c4242564.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end -end -function c4242564.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - end -end - -function c4242564.condition2(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp - end -function c4242564.operation2(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) - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.Destroy(c,REASON_EFFECT) - - end -end -function c4242564.condition3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED) and e:GetHandler():IsReason(REASON_BATTLE) -end -function c4242564.filter(c,e,tp) - return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and not c:IsLevelBelow(3) and (c:IsSetCard(0x666) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) -end -function c4242564.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242564.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) -end -function c4242564.operation3(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,c4242564.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end \ No newline at end of file diff --git a/Script/c4242565.lua b/Script/c4242565.lua deleted file mode 100644 index 27fe0e9..0000000 --- a/Script/c4242565.lua +++ /dev/null @@ -1,166 +0,0 @@ ---Lunar Phase Beast: Pegasus Moon Burst -function c4242565.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - --atk - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_PZONE) - e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(c4242565.efilter) - e1:SetValue(300) - c:RegisterEffect(e1) - - --Destroy spell, move grave pend to extra - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242565,3)) - e2:SetCountLimit(1,42425652) - e2:SetCategory(CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_PZONE) --- e2:SetCost(c4242565.condition4) - e2:SetTarget(c4242565.target4) - e2:SetOperation(c4242565.operation4) - c:RegisterEffect(e2) - - --Search - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242565,2)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND) - e3:SetCost(c4242565.descon1) - e3:SetTarget(c4242565.destg1) - e3:SetOperation(c4242565.desop1) - c:RegisterEffect(e3) - - --Tribute - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242565,3)) - e4:SetCountLimit(1,42425651) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLE_DAMAGE) - e4:SetCost(c4242565.descost2) - e4:SetTarget(c4242565.destg2) - e4:SetOperation(c4242565.desop2) - c:RegisterEffect(e4) - --sp summon - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(4242565,5)) - e6:SetCountLimit(1,42425652) - e6:SetCategory(CATEGORY_SPECIAL_SUMMON) - e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e6:SetCode(EVENT_DESTROYED) - e6:SetCondition(c4242565.condition3) - e6:SetTarget(c4242565.target3) - e6:SetOperation(c4242565.operation3) - c:RegisterEffect(e6) -end - - --Destroy spell, move grave pend to extra -function c4242565.filter4(c) - return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_SPELL) and not c:IsCode(4242565) -end -function c4242565.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) --Duel.IsExistingMatchingCard(c4242565.filter4,tp,LOCATION_ONFIELD,0,1,nil) -end ---[[function c4242565.condition4(e,tp,eg,ep,ev,re,r,rp,chk) -if chk==0 then return Duel.IsExistingMatchingCard(c4242565.cfilter,tp,LOCATION_GRAVE,0,1,nil) end -end]]-- -function c4242565.target4(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(c4242565.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c4242565.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_GRAVE) -end -function c4242565.operation4(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(c4242565.filter4,tp,LOCATION_ONFIELD,0,nil) - if not tc or not tc:IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - if not e:GetHandler():IsRelateToEffect(e) then return end - local sg=g:Select(tp,1,1,nil) - if Duel.Destroy(sg,REASON_EFFECT)>0 then - Duel.SendtoExtraP(tc,nil,REASON_EFFECT) - end ---[[ if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT)]]-- -end - ---atk boost code -function c4242565.efilter(e,c) - return c:IsSetCard(0x666) -end - ---Effect 1 (Search) Code -function c4242565.descon1(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 c4242565.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242565.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242565.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242565.desop1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242565.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end - ---Effect 4 (Special Summon) Code -function c4242565.filter2(c,e,tp) - return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(5) and not c:IsLevelBelow(4) and (c:IsSetCard(0x666) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) -end -function c4242565.descost2(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 c4242565.destg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242565.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) -end -function c4242565.desop2(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,c4242565.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) - end -end ---Death replace code -function c4242565.condition3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) -end -function c4242565.dfilter(c,e,tp) - return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(3) and not c:IsLevelBelow(2) and (c:IsSetCard(0x666) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) -end -function c4242565.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242565.dfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) -end -function c4242565.operation3(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,c4242565.dfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp) - if g:GetCount()>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/Script/c4242566.lua b/Script/c4242566.lua deleted file mode 100644 index 37b046b..0000000 --- a/Script/c4242566.lua +++ /dev/null @@ -1,121 +0,0 @@ ---Lunar Phase Beast: Moon Burst the Wind Rider -function c4242566.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - - --Search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242566,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c4242566.descon1) - e1:SetTarget(c4242566.destg1) - e1:SetOperation(c4242566.desop1) - c:RegisterEffect(e1) - --Pierce -local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_PIERCE) - e2:SetRange(LOCATION_PZONE) - e2:SetTargetRange(LOCATION_ONFIELD,0) - e2:SetTarget(c4242566.target) - c:RegisterEffect(e2) - --If deal damage,kill a thing - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242566,2)) - e3:SetCountLimit(1,42425661) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_BATTLE_DAMAGE) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(c4242566.descon) - e3:SetTarget(c4242566.destg) - e3:SetOperation(c4242566.desop) - c:RegisterEffect(e3) ---Kill card draw - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242566,3)) - e4:SetCountLimit(1,42425662) - e4:SetCategory(CATEGORY_DRAW) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_PZONE) --- e4:SetCost(c4242566.cost4) - e4:SetTarget(c4242566.target4) - e4:SetOperation(c4242566.operation4) - c:RegisterEffect(e4) -end -function c4242566.filter4(c) - return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(4242566) -end -function c4242566.cost4(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingTarget(c4242566.filter4,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4242566.filter4,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.Destroy(g,REASON_EFFECT) -end -function c4242566.target4(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c4242566.operation4(e,tp,eg,ep,ev,re,r,rp) - if chk==0 then return Duel.IsExistingTarget(c4242566.filter4,tp,LOCATION_ONFIELD,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.SelectTarget(tp,c4242566.filter4,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.Destroy(g,REASON_EFFECT) - if not e:GetHandler():IsRelateToEffect(e) then return end - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Draw(p,d,REASON_EFFECT) -end - - ---If deal damage,kill a thing -function c4242566.descon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c4242566.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4242566.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end - ---Effect 1 (Search) Code -function c4242566.descon1(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 c4242566.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242566.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242566.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242566.desop1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242566.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end ---Pierce -function c4242566.target(e,c) - return c:IsSetCard(0x666) -end \ No newline at end of file diff --git a/Script/c4242567.lua b/Script/c4242567.lua deleted file mode 100644 index db4006a..0000000 --- a/Script/c4242567.lua +++ /dev/null @@ -1,85 +0,0 @@ ---A Full Moon Rises -function c4242567.initial_effect(c) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetCountLimit(1,4242567) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c4242567.spcon) - e1:SetOperation(c4242567.spop) - c:RegisterEffect(e1) - --remove 1 MONSTER WHEN SUMMONED - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242567,0)) - e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetTarget(c4242567.target2) - e2:SetOperation(c4242567.operation2) - c:RegisterEffect(e2) - --Remove self - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242567,2)) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(c4242567.condition3) - e3:SetTarget(c4242567.target3) - e3:SetOperation(c4242567.operation3) - c:RegisterEffect(e3) -end ---banish self - -function c4242567.condition3(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end -function c4242567.target3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) -end -function c4242567.operation3(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end - - ---Sp summon rule -function c4242567.spfilter(c) - return c:IsSetCard(0x666) and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceup() -end -function c4242567.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(c4242567.spfilter,tp,LOCATION_REMOVED,0,3,nil) -end -function c4242567.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c4242567.spfilter,tp,LOCATION_REMOVED,0,3,3,nil) - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.SendtoDeck(g,nil,2,REASON_COST) -end - ---Banish 1 on summon -function c4242567.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - local tc=g:GetFirst() - if tc and tc:IsAbleToRemove() then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) - end - end - -function c4242567.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end - end diff --git a/Script/c4242568.lua b/Script/c4242568.lua deleted file mode 100644 index 1324fdf..0000000 --- a/Script/c4242568.lua +++ /dev/null @@ -1,126 +0,0 @@ ---Lunar Phase: Moon Burst the Forgotten Child -function c4242568.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - --search if deal damage - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(12152769,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetCountLimit(1,4242568) - e1:SetCondition(c4242568.condition) - e1:SetTarget(c4242568.target) - e1:SetOperation(c4242568.operation) - c:RegisterEffect(e1) - --Damage during standby - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242568,0)) - e2:SetCategory(CATEGORY_DAMAGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCountLimit(1,42425681) - e2:SetCondition(c4242568.conditiond) - e2:SetCost(c4242568.dmcost) - e2:SetTarget(c4242568.dmtg) - e2:SetOperation(c4242568.dmop) - c:RegisterEffect(e2) - - --pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) - - --Search - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242568,2)) - e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_HAND) - e4:SetCost(c4242568.descon1) - e4:SetTarget(c4242568.destg1) - e4:SetOperation(c4242568.desop1) - c:RegisterEffect(e4) -end ---search tiny pony -function c4242568.descon1(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 c4242568.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242568.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242568.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242568.desop1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242568.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end ---Damage during standby -function c4242568.counterfilter(c) - return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM -end -function c4242568.conditiond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function c4242568.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCustomActivityCount(4242568,tp,ACTIVITY_SPSUMMON)==0 end - -end -function c4242568.dmfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x666) -end -function c4242568.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242568.dmfilter,tp,LOCATION_EXTRA,0,1,nil) end - local g=Duel.GetMatchingGroup(c4242568.dmfilter,tp,LOCATION_EXTAR,0,nil) - local dam=g:GetClassCount(Card.GetCode)*300 - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) -end -function c4242568.dmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c4242568.dmfilter,tp,LOCATION_EXTRA,0,nil) - local dam=g:GetClassCount(Card.GetCode)*300 - Duel.Damage(1-tp,dam,REASON_EFFECT) - end ---search if deal damage -function c4242568.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp -end -function c4242568.filter2(c) - return c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and not c:IsLevelBelow(3) -end -function c4242568.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end -function c4242568.operation(e,tp,eg,ep,ev,re,r,rp) - local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,c4242568.filter2,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 - - - - - - - - - - - \ No newline at end of file diff --git a/Script/c4242569.lua b/Script/c4242569.lua deleted file mode 100644 index 6050b1b..0000000 --- a/Script/c4242569.lua +++ /dev/null @@ -1,118 +0,0 @@ ---MoonBurst:The Awakened - -function c4242569.initial_effect(c) -c:SetUniqueOnField(1,0,4242569) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c4242569.spcon) - e1:SetOperation(c4242569.spop) - c:RegisterEffect(e1) - --summon success - --local e2=Effect.CreateEffect(c) --- e2:SetType(EFFECT_TYPE_SINGLE) --- e2:SetCode(EFFECT_MATERIAL_CHECK) --- e2:SetValue(c4242569.matcheck) --- c:RegisterEffect(e2) - --Pierce - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e3) ---( --cannot negate summon - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_SINGLE) - e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) - e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - c:RegisterEffect(e4) - --Nuke field, cannot negate - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - - e5:SetCode(EVENT_SPSUMMON_SUCCESS) - e5:SetTarget(c4242569.target) - e5:SetOperation(c4242569.operation) - c:RegisterEffect(e5) -end - - --Sp summon rule -function c4242569.spfilter(c) - return c:IsFusionSetCard(0x666) and c:IsCanBeFusionMaterial() and c:IsFaceup() -end - -function c4242569.spcon(e,c) - if c==nil then return true end - if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(c4242569.spfilter,c:GetControler(),LOCATION_EXTRA,0,nil) - local ct=g:GetClassCount(Card.GetCode) - return ct>=5 -end -function c4242569.spop(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.GetMatchingGroup(c4242569.spfilter,tp,LOCATION_EXTRA,0,nil) - local rg=Group.CreateGroup() - for i=1,5 do - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=g:Select(tp,1,1,nil):GetFirst() - if tc then - rg:AddCard(tc) - g:Remove(Card.IsCode,nil,tc:GetCode()) - end - end - Duel.Remove(rg,POS_FACEUP,REASON_COST) -end - - -function c4242569.matcheck(e,c) - local ct=c:GetMaterial() - if ct:GetCount()==1 then - --Nuke on summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242569,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c4242569.target) - e1:SetOperation(c4242569.operation) - c:RegisterEffect(e1) - end - --Nuke on summon - if ct:GetCount()==8 then - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242569,0)) - e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c4242569.target) - e1:SetOperation(c4242569.operation) - c:RegisterEffect(e1) - end - --Can't negate nuke - if ct:GetCount()==3 then - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetTarget(c4242569.target) - e1:SetOperation(c4242569.operation) - c:RegisterEffect(e1) - end - end ---Nuke on summon -function c4242569.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) -end -function c4242569.operation(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end - - - diff --git a/Script/c4242570.lua b/Script/c4242570.lua deleted file mode 100644 index d3a1bd0..0000000 --- a/Script/c4242570.lua +++ /dev/null @@ -1,92 +0,0 @@ ---Lunar Guardian's Blessing -function c4242570.initial_effect(c) -c:EnableCounterPermit(0x666) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242564,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4242570+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c4242570.activate) - c:RegisterEffect(e1) ---add counter - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetOperation(c4242570.ctop) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - 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_SZONE) - e0:SetOperation(aux.chainreg) - c:RegisterEffect(e0) - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e4:SetCode(EVENT_CHAIN_SOLVED) - e4:SetRange(LOCATION_SZONE) - e4:SetOperation(c4242570.acop) - c:RegisterEffect(e4) - --atkup - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_FIELD) - e5:SetCode(EFFECT_UPDATE_ATTACK) - e5:SetRange(LOCATION_SZONE) - e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x666)) - e5:SetValue(c4242570.atkval) - c:RegisterEffect(e5) - --Destroy replace - local e6=Effect.CreateEffect(c) - e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) - e6:SetCode(EFFECT_DESTROY_REPLACE) - e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e6:SetRange(LOCATION_SZONE) - e6:SetTarget(c4242570.desreptg) - e6:SetOperation(c4242570.desrepop) - c:RegisterEffect(e6) -end ---Activation code -function c4242570.thfilter(c) - return c:IsSetCard(0x666) and c:IsLevelBelow(13) and c:IsAbleToHand() -end -function c4242570.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c4242570.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(4242570,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 c4242570.atkval(e,c) - return e:GetHandler():GetCounter(0x666)*50 -end -function c4242570.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:GetType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x666) and e:GetHandler():GetFlagEffect(1)>0 then - e:GetHandler():AddCounter(0x666,1) - end -end -function c4242570.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x666) or c:IsSetCard(0x666) and IsType(TYPE_SPELL) -end -function c4242570.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(c4242570.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x666,1) - end -end -function c4242570.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) - and e:GetHandler():GetCounter(0x666)>=4 end - return true -end -function c4242570.desrepop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(ep,0x666,4,REASON_EFFECT) -end diff --git a/Script/c4242571.lua b/Script/c4242571.lua deleted file mode 100644 index 41ebe0c..0000000 --- a/Script/c4242571.lua +++ /dev/null @@ -1,93 +0,0 @@ ---Lunar Phase Beast: Moon Burst Spell Eater -function c4242571.initial_effect(c) - --Pendulum Summon - aux.EnablePendulumAttribute(c) - --Search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242574,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c4242571.descon1) - e1:SetTarget(c4242571.destg1) - e1:SetOperation(c4242571.desop1) - c:RegisterEffect(e1) - --Destroy Spell & Trap - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242571,1)) - e2:SetCountLimit(1,42425711) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(c4242571.descon2) - e2:SetTarget(c4242571.destg2) - e2:SetOperation(c4242571.desop2) - c:RegisterEffect(e2) - --Destroy Replace - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242571,2)) - e3:SetCountLimit(1,42425712) - e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DESTROY_REPLACE) - e3:SetRange(LOCATION_PZONE) - e3:SetTarget(c4242571.destg3) - e3:SetValue(c4242571.desval3) - c:RegisterEffect(e3) -end - ---Effect 1 (Search) Code -function c4242571.descon1(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 c4242571.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242571.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242571.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242571.desop1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242571.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end - ---Effect 2 (Destroy spell & trap) Code -function c4242571.descon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c4242571.filter1(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function c4242571.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c4242571.filter1(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c4242571.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4242571.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4242571.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 - ---Effect 3 (Destroy Replace) Code -function c4242571.filter3(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) - and (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp) -end -function c4242571.destg3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return eg:IsExists(c4242571.filter3,1,nil,tp) end - return true -end -function c4242571.desval3(e,c) - return c4242571.filter3(c,e:GetHandlerPlayer()) -end \ No newline at end of file diff --git a/Script/c4242572.lua b/Script/c4242572.lua deleted file mode 100644 index cd52c43..0000000 --- a/Script/c4242572.lua +++ /dev/null @@ -1,33 +0,0 @@ - --Lunar Cycles -function c4242572.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4242572) - e1:SetTarget(c4242572.target) - e1:SetOperation(c4242572.activate) - c:RegisterEffect(e1) -end -function c4242572.filter(c) - return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) -end -function c4242572.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_HAND) and chkc:IsControler(tp) and c4242572.filter(chkc) end - if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingTarget(c4242572.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(4242572,0)) - local g=Duel.SelectTarget(tp,c4242572.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) -end -function c4242572.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,REASON_EFFECT+REASON_RETURN,nil,nil) - Duel.BreakEffect() - Duel.Draw(tp,2,REASON_EFFECT) - end -end diff --git a/Script/c4242573.lua b/Script/c4242573.lua deleted file mode 100644 index d4d436d..0000000 --- a/Script/c4242573.lua +++ /dev/null @@ -1,49 +0,0 @@ ---Moon's Clouds to Hide -function c4242573.initial_effect(c) - ---Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242564,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4242573+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c4242573.activate) - c:RegisterEffect(e1) ---Can't target scales - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_SZONE,0) - e2:SetTarget(c4242573.tgtg) - e2:SetValue(aux.tgoval) - c:RegisterEffect(e2) -end - ---Can't Target scales code -function c4242573.tgtg(e,c) - return (c:IsSetCard(0x666)) - and (c:GetSequence()==6 or c:GetSequence()==7) -end ---Activation code -function c4242573.thfilter(c) - return c:IsSetCard(0x666) and c:IsLevelBelow(4) and c:IsAbleToHand() -end - -function c4242573.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c4242573.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(4242573,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 - - - - - - diff --git a/Script/c4242574.lua b/Script/c4242574.lua deleted file mode 100644 index 102a7b4..0000000 --- a/Script/c4242574.lua +++ /dev/null @@ -1,126 +0,0 @@ ---Lunar Phase Beast: Moon Burst Clearing -function c4242574.initial_effect(c) -aux.EnablePendulumAttribute(c,true) - - --Search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242574,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c4242574.cost1) - e1:SetTarget(c4242574.target1) - e1:SetOperation(c4242574.operation1) - c:RegisterEffect(e1) - - --Banish - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242574,1)) - e2:SetCountLimit(1,42425741) - e2:SetCategory(CATEGORY_REMOVE) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetCost(c4242574.sccost) - e2:SetTarget(c4242574.target2) - e2:SetOperation(c4242574.operation2) - c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e3) - - --shuffle one 0x666 into the deck, select one spell or trap and send it back to the owner's deck - --return a card to deck - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242574,3)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_PZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(1,4242574) - e4:SetCondition(c4242574.condition) - e4:SetCost(c4242574.cost4) - e4:SetTarget(c4242574.target4) - e4:SetOperation(c4242574.operation4) - c:RegisterEffect(e4) -end - - - ---Effect 1 (Search) Code -function c4242574.cost1(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 c4242574.filter1(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242574.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242574.filter1,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242574.operation1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242574.filter1,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end - - - ---Effect 2/3 (Banish code fuction -function c4242574.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler() end - Duel.Remove(e:GetHandler(),POS_FACEUP,nil) -end -function c4242574.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) -end -function c4242574.operation2(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - end -end - ---Effect 4 anti back row -function c4242574.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x666) -end -function c4242574.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() and c:IsSetCard(0x666) -end -function c4242574.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(c4242574.cfilter,tp,LOCATION_MZONE,0,nil) - return g:GetClassCount(Card.GetCode)>=2 -end -function c4242574.cost4(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242574.filter2,tp,LOCATION_EXTRA,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c4242574.filter2,tp,LOCATION_EXTRA,0,1,1,nil) - Duel.SendtoDeck(g,nil,2,REASON_COST) -end -function c4242574.filter3(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() -end -function c4242574.target4(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and c4242574.filter3(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(c4242574.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,c4242574.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) -end -function c4242574.operation4(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) - - end -end \ No newline at end of file diff --git a/Script/c4242575.lua b/Script/c4242575.lua deleted file mode 100644 index a3ffc4c..0000000 --- a/Script/c4242575.lua +++ /dev/null @@ -1,71 +0,0 @@ ---Night Guardian's Sword -function c4242575.initial_effect(c) - ---Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242575,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCountLimit(1,4242575+EFFECT_COUNT_CODE_OATH) - e1:SetOperation(c4242575.activate) - c:RegisterEffect(e1) - --negate - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242575,1)) - e2:SetCountLimit(1,42425751) - e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_SZONE) - e2:SetCondition(c4242575.discon) - e2:SetTarget(c4242575.distg) - e2:SetOperation(c4242575.disop) - c:RegisterEffect(e2) - -end - ---Activation code -function c4242575.thfilter(c) - return c:IsSetCard(0x666) and c:IsLevelBelow(13) and c:IsAbleToHand() -end -function c4242575.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(c4242575.thfilter,tp,LOCATION_DECK,0,nil) - if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(4242575,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 - ---negate code -function c4242575.discon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function c4242575.disfilter(c) - return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) and c:IsFaceup()) and c:IsAbleToDeckAsCost() -end -function c4242575.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242575.disfilter,tp,LOCATION_GRAVE,0,2,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function c4242575.disop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c4242575.disfilter,tp,LOCATION_GRAVE,0,2,2,nil) - if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then - Duel.NegateActivation(ev) - if re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end - end -end - diff --git a/Script/c4242576.lua b/Script/c4242576.lua deleted file mode 100644 index 87fb98a..0000000 --- a/Script/c4242576.lua +++ /dev/null @@ -1,115 +0,0 @@ ---Lunar Phase Beast: Moon Burst Vandalizing -function c4242576.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - - --Search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242576,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c4242576.descon1) - e1:SetTarget(c4242576.destg1) - e1:SetOperation(c4242576.desop1) - c:RegisterEffect(e1) - --On death kill pend scale - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242576,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetCountLimit(1,42425761) - e2:SetCondition(c4242576.condition) - e2:SetTarget(c4242576.target) - e2:SetOperation(c4242576.operation) - c:RegisterEffect(e2) - --disable - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_DISABLE) - e3:SetRange(LOCATION_PZONE) - e3:SetTargetRange(0,LOCATION_SZONE) - e3:SetTarget(c4242576.distg) - c:RegisterEffect(e3) - --disable effect - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_CHAIN_SOLVING) - e4:SetRange(LOCATION_PZONE) - e4:SetOperation(c4242576.disop) - c:RegisterEffect(e4) - -end - - ---Effect 1 (Search) Code -function c4242576.descon1(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 c4242576.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242576.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242576.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242576.desop1(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242576.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end ---On death kill pend scale -function c4242576.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_BATTLE) -end -function c4242576.desfilter(c) - return (c:GetSequence()==6 or c:GetSequence()==7) -end -function c4242576.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,c4242576.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) -end -function c4242576.operation(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 - - ---death into scale -function c4242576.pencon(e,tp,eg,ep,ev,re,r,rp) - return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) -end -function c4242576.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLocation(1-tp,LOCATION_SZONE,6) or Duel.CheckLocation(1-tp,LOCATION_SZONE,7) end -end -function c4242576.penop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.CheckLocation(1-tp,LOCATION_SZONE,6) and not Duel.CheckLocation(1-tp,LOCATION_SZONE,7) then return false end - local c=e:GetHandler() - if c:IsRelateToEffect(e) then - Duel.MoveToField(c,1-tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) - end -end ---negate -function c4242576.distg(e,c) - return c:IsType(TYPE_SPELL) and (c:GetSequence()==6 or c:GetSequence()==7) -end -function c4242576.disop(e,tp,eg,ep,ev,re,r,rp) - local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) - if re:IsActiveType(TYPE_SPELL) and p~=tp and loc==LOCATION_SZONE and (seq==6 or seq==7) then - Duel.NegateEffect(ev) - end -end - - diff --git a/Script/c4242577.lua b/Script/c4242577.lua deleted file mode 100644 index af9b4bf..0000000 --- a/Script/c4242577.lua +++ /dev/null @@ -1,106 +0,0 @@ ---MoonBurst of XIII -function c4242577.initial_effect(c) ---pendulum summon - aux.EnablePendulumAttribute(c,false) - --fusion material - c:EnableReviveLimit() - aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x666),3,true) - --special summon rule - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_EXTRA) - e1:SetCondition(c4242577.spcon) - e1:SetOperation(c4242577.spop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(4242577,0)) - e2:SetCategory(CATEGORY_ATKCHANGE) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_BATTLE_DESTROYED) - e2:SetRange(LOCATION_MZONE) - e2:SetCondition(c4242577.atcon) - e2:SetOperation(c4242577.atop) - c:RegisterEffect(e2) ---unbanish cards from scale - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(4242577,3)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetRange(LOCATION_PZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCountLimit(2,4242577) - e4:SetTarget(c4242577.target) - e4:SetOperation(c4242577.operation) - c:RegisterEffect(e4) - -end - -function c4242577.cefilter(c) - return c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) -end - -function c4242577.target(e,tp,eg,ep,ev,re,r,rp,chk) -if chk==0 then return Duel.IsExistingMatchingCard(c4242577.spfilter,tp,LOCATION_REMOVED,0,1,nil) end -Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) -Duel.SelectTarget(tp,c4242577.spfilter,tp,LOCATION_REMOVED,0,1,1,nil) -end - -function c4242577.operation(e,tp,eg,ep,ev,re,r,rp) -local tc=Duel.GetFirstTarget() -if tc and tc:IsRelateToEffect(e) then -Duel.SendtoExtraP(tc,nil,REASON_EFFECT) -end -end - -c4242577.pendulum_level=6 -function c4242577.spfilter1(c,tp) - return c:IsSetCard(0x666) and c:IsCanBeFusionMaterial() and c:IsReleasable() - and Duel.IsExistingMatchingCard(c4242577.spfilter2,tp,LOCATION_MZONE,0,2,c) -end -function c4242577.spfilter2(c) - return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsReleasable() -end -function c4242577.thcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return not c:IsFaceup() -end -function c4242577.spcon(e,c) - if c==nil then return true end - local tp=c:GetControler() - local c=e:GetHandler() - return not c:IsFaceup() and - Duel.GetLocationCount(tp,LOCATION_MZONE)<3 - and Duel.IsExistingMatchingCard(c4242577.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp) -end -function c4242577.spop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,c4242577.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectMatchingCard(tp,c4242577.spfilter2,tp,LOCATION_MZONE,0,2,2,g:GetFirst()) - g:Merge(g2) - local cg=g:Filter(Card.IsFacedown,nil) - if cg:GetCount()>0 then - Duel.ConfirmCards(1-tp,cg) - end - Duel.Release(g,nil,2,REASON_COST) --release? -end - -function c4242577.filter(c,rc) - return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetReasonCard()==rc -end -function c4242577.atcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(c4242577.filter,1,nil,e:GetHandler()) -end -function c4242577.atop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() then - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetValue(500) - e2:SetReset(RESET_EVENT+0x1ff0000) - c:RegisterEffect(e2) - end -end diff --git a/Script/c4242578.lua b/Script/c4242578.lua deleted file mode 100644 index fd3233f..0000000 --- a/Script/c4242578.lua +++ /dev/null @@ -1,39 +0,0 @@ ---Lunar Phase: Storm Front -function c4242578.initial_effect(c) ---atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetDescription(aux.Stringid(4242578,0)) - e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(c4242578.condition) - e1:SetCost(c4242578.cost) - e1:SetOperation(c4242578.operation) - c:RegisterEffect(e1) -end -function c4242578.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and a:IsSetCard(0x666) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsSetCard(0x666) and d:IsRelateToBattle()) -end -function c4242578.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function c4242578.operation(e,tp,eg,ep,ev,re,r,rp,chk) - local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end - if not a:IsRelateToBattle() then return end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) - e1:SetValue(1000) - a:RegisterEffect(e1) -end diff --git a/Script/c4242580.lua b/Script/c4242580.lua deleted file mode 100644 index aa29a07..0000000 --- a/Script/c4242580.lua +++ /dev/null @@ -1,60 +0,0 @@ ---トラミッド・ハンター -function c4242580.initial_effect(c) - --extra summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetCondition(c4242580.sumcon) - e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ROCK)) - c:RegisterEffect(e1) - --field - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(95923441,0)) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_EXTRA) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1) - e2:SetCondition(c4242580.condition) - e2:SetTarget(c4242580.target) - e2:SetOperation(c4242580.operation) - c:RegisterEffect(e2) -end -function c4242580.sumcon(e) - local tc=Duel.GetFieldCard(0,LOCATION_SZONE,5) - if tc and tc:IsFaceup() then return true end - tc=Duel.GetFieldCard(1,LOCATION_SZONE,5) - return tc and tc:IsFaceup() -end -function c4242580.filter(c,tp,code) - return c:IsType(TYPE_FIELD) and c:IsSetCard(0x666) and c:GetActivateEffect():IsActivatable(tp) and not c:IsCode(code) -end -function c4242580.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function c4242580.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) - if chkc then return false end - if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0x666) and tc:IsAbleToGrave() and tc:IsCanBeEffectTarget(e) - and Duel.IsExistingMatchingCard(c4242580.filter,tp,LOCATION_DECK,0,1,nil,tp,tc:GetCode()) end - Duel.SetTargetCard(tc) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tc,1,0,0) -end -function c4242580.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,c4242580.filter,tp,LOCATION_DECK,0,1,1,nil,tp,tc:GetCode()) - if g:GetCount()>0 then - local tc=g:GetFirst() - Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - local te=tc:GetActivateEffect() - local tep=tc:GetControler() - local cost=te:GetCost() - if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end - Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain()) - end - end -end diff --git a/Script/c4242581.lua b/Script/c4242581.lua deleted file mode 100644 index 4445134..0000000 --- a/Script/c4242581.lua +++ /dev/null @@ -1,106 +0,0 @@ ---Lunar Phase: Moon Burst the Storm -function c4242581.initial_effect(c) - --pendulum summon - aux.EnablePendulumAttribute(c) - --Search - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(4242581,0)) - e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND) - e1:SetCost(c4242581.thcon) - e1:SetTarget(c4242581.thtg) - e1:SetOperation(c4242581.thop) - c:RegisterEffect(e1) - --Destroy monster - local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCountLimit(1,42425811) - e2:SetCondition(c4242581.descon1) - e2:SetCost(c4242581.descost1) - e2:SetTarget(c4242581.destg1) - e2:SetOperation(c4242581.desop1) - c:RegisterEffect(e2) - --Kill spell, kill monster - local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(4242581,1)) - e3:SetCategory(CATEGORY_DESTROY) - e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetRange(LOCATION_PZONE) - e3:SetCountLimit(1,42425812) - e3:SetCost(c4242581.descost2) - e3:SetTarget(c4242581.destg2) - e3:SetOperation(c4242581.desop2) - c:RegisterEffect(e3) -end ---Effect 1 (Search) Code -function c4242581.thcon(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 c4242581.filter(c) - return c:IsCode(4242564) and c:IsAbleToHand() -end -function c4242581.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(c4242581.filter,tp,0x51,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x51) -end -function c4242581.thop(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,c4242581.filter,tp,0x51,0,1,1,nil):GetFirst() - if tg then - Duel.SendtoHand(tg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tg) - end -end - ---Destroy monster -function c4242581.descon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM -end -function c4242581.descost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Destroy(e:GetHandler(),REASON_COST) -end -function c4242581.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsController(1-tp) end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4242581.desop1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end - ---Kill spell, kill monster -function c4242581.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(4242581) and c:IsReleasable() -end -function c4242581.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(c4242581.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end - local g=Duel.SelectMatchingCard(tp,c4242581.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) - Duel.Release(g,REASON_EFFECT) -end -function c4242581.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function c4242581.desop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end -end \ No newline at end of file diff --git a/pics/210424256.jpg b/pics/210424256.jpg new file mode 100644 index 0000000..c188122 Binary files /dev/null and b/pics/210424256.jpg differ diff --git a/pics/210424257.jpg b/pics/210424257.jpg new file mode 100644 index 0000000..59a641c Binary files /dev/null and b/pics/210424257.jpg differ diff --git a/pics/210424258.jpg b/pics/210424258.jpg new file mode 100644 index 0000000..6b06a2e Binary files /dev/null and b/pics/210424258.jpg differ diff --git a/pics/210424259.jpg b/pics/210424259.jpg new file mode 100644 index 0000000..dbbb2e6 Binary files /dev/null and b/pics/210424259.jpg differ diff --git a/pics/210424260.jpg b/pics/210424260.jpg new file mode 100644 index 0000000..5cda116 Binary files /dev/null and b/pics/210424260.jpg differ diff --git a/pics/210424261.jpg b/pics/210424261.jpg new file mode 100644 index 0000000..c571cfc Binary files /dev/null and b/pics/210424261.jpg differ diff --git a/pics/210424262.jpg b/pics/210424262.jpg new file mode 100644 index 0000000..803fdef Binary files /dev/null and b/pics/210424262.jpg differ diff --git a/pics/210424263.jpg b/pics/210424263.jpg new file mode 100644 index 0000000..9aae990 Binary files /dev/null and b/pics/210424263.jpg differ diff --git a/pics/210424264.jpg b/pics/210424264.jpg new file mode 100644 index 0000000..ed0fa2d Binary files /dev/null and b/pics/210424264.jpg differ diff --git a/pics/210424265.jpg b/pics/210424265.jpg new file mode 100644 index 0000000..925941e Binary files /dev/null and b/pics/210424265.jpg differ diff --git a/pics/210424266.jpg b/pics/210424266.jpg new file mode 100644 index 0000000..12d6d62 Binary files /dev/null and b/pics/210424266.jpg differ diff --git a/pics/210424267.jpg b/pics/210424267.jpg new file mode 100644 index 0000000..5653612 Binary files /dev/null and b/pics/210424267.jpg differ diff --git a/pics/210424268.jpg b/pics/210424268.jpg new file mode 100644 index 0000000..ada3d17 Binary files /dev/null and b/pics/210424268.jpg differ diff --git a/pics/210424269.jpg b/pics/210424269.jpg new file mode 100644 index 0000000..14aa944 Binary files /dev/null and b/pics/210424269.jpg differ diff --git a/pics/210424270.jpg b/pics/210424270.jpg new file mode 100644 index 0000000..fc9212a Binary files /dev/null and b/pics/210424270.jpg differ diff --git a/pics/210424271.jpg b/pics/210424271.jpg new file mode 100644 index 0000000..29680ca Binary files /dev/null and b/pics/210424271.jpg differ diff --git a/pics/210424272.jpg b/pics/210424272.jpg new file mode 100644 index 0000000..24e7170 Binary files /dev/null and b/pics/210424272.jpg differ diff --git a/script/c210424256.lua b/script/c210424256.lua new file mode 100644 index 0000000..52ba540 --- /dev/null +++ b/script/c210424256.lua @@ -0,0 +1,148 @@ +--Moon Burst: Wish Maker +local card = c210424256 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --Protect + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424256) + e1:SetTarget(card.prottg) + e1:SetOperation(card.protop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --swap + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(4066,0)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_BECOME_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,210424257) + e4:SetCondition(card.betarget) + e4:SetTarget(card.swaptg) + e4:SetOperation(card.swapop) + c:RegisterEffect(e4) + --return 2 to deck, draw 1 + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(4066,1)) + e5:SetCategory(CATEGORY_DRAW) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_BECOME_TARGET) + e5:SetProperty(EFFECT_FLAG_CARD_TARGET) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,210424257) + e5:SetCondition(card.betarget) + e5:SetTarget(card.drawtarget) + e5:SetOperation(card.drawop) + c:RegisterEffect(e5) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.indfilter(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.prottg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and card.indfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.indfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():GetFlagEffect(210424256)==0 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,card.indfilter,tp,LOCATION_MZONE,0,1,1,nil) + e:GetHandler():RegisterFlagEffect(210424256,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) +end +function card.protop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCountLimit(1) + e1:SetValue(card.valcon) + e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + tc:RegisterEffect(e1) +end +end +function card.valcon(e,re,r,rp) + return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 +end +--return 2 to deck, draw 1 +function card.filter(c) + return c:IsSetCard(0x666) and c:IsAbleToDeck() and c:IsType(TYPE_PENDULUM) +end +function card.drawtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_EXTRA) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and card.filter(chkc) end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():GetFlagEffect(210424256)==0 + and Duel.IsExistingTarget(card.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,2,nil) end + e:GetHandler():RegisterFlagEffect(210424256,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,card.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,2,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function card.drawop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end + Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + local g=Duel.GetOperatedGroup() + if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK) + if ct==2 then + Duel.BreakEffect() + Duel.Draw(tp,1,REASON_EFFECT) +end +end +--swap +function card.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.swaptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and card.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(card.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,card.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) +end +function card.swapop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) +end + if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if not Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) +end +end +end \ No newline at end of file diff --git a/script/c210424257.lua b/script/c210424257.lua new file mode 100644 index 0000000..9100146 --- /dev/null +++ b/script/c210424257.lua @@ -0,0 +1,137 @@ +--Moon Burst: Spell Eater +local card = c210424257 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --bounce 1 pony you control, destroy 1 spell/trap opp controls + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424258) + e1:SetTarget(card.destg) + e1:SetOperation(card.desop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --swap + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(4066,0)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_BECOME_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,210424259) + e4:SetCondition(card.betarget) + e4:SetTarget(card.swaptg) + e4:SetOperation(card.swapop) + c:RegisterEffect(e4) + --change target's battle position + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(4066,2)) + e5:SetCategory(CATEGORY_POSITION) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_BECOME_TARGET) + e5:SetProperty(EFFECT_FLAG_CARD_TARGET) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,210424259) + e5:SetCondition(card.betarget) + e5:SetTarget(card.postg) + e5:SetOperation(card.posop) + c:RegisterEffect(e5) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.desfilter1(c,e,sp) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.desfilter2(c,e,sp) + return c:IsType(TYPE_SPELL+TYPE_TRAP) +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return (chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.desfilter1(chkc)) +and (chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp-1) and card.desfilter2(chkc)) end + if chk==0 then return Duel.IsExistingTarget(card.desfilter1,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(card.desfilter2,tp,0,LOCATION_ONFIELD,1,nil) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,card.desfilter1,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) +end +function card.desop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then + local g=Duel.SelectMatchingCard(tp,card.desfilter2,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + Duel.Destroy(g,REASON_EFFECT) +end +end +end +function card.filter(c) + return c:IsCanChangePosition() +end +function card.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and card.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.filter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,card.filter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) +end +function card.posop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) +end +end +function card.spfilter(c,e,tp) +return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.swaptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and card.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(card.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,card.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) +end +function card.swapop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) +end + if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if not Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) +end +end +end \ No newline at end of file diff --git a/script/c210424258.lua b/script/c210424258.lua new file mode 100644 index 0000000..3797cc2 --- /dev/null +++ b/script/c210424258.lua @@ -0,0 +1,124 @@ +--Moon Burst: Origins +local card = c210424258 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --Target 1 pony, add a different one to the hand + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424260) + e1:SetTarget(card.stg) + e1:SetOperation(card.sop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --spsummon + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e4:SetCountLimit(1,210424261) + e4:SetTarget(card.sumtg) + e4:SetOperation(card.sumop) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e5) + --on target, search 1 spell + local e6=Effect.CreateEffect(c) + e6:SetCategory(CATEGORY_SEARCH) + e6:SetType(EFFECT_TYPE_QUICK_O) + e6:SetCode(EVENT_BECOME_TARGET) + e6:SetRange(LOCATION_MZONE) + e6:SetCountLimit(1,210424262) + e6:SetCondition(card.betarget) + e6:SetTarget(card.stg2) + e6:SetOperation(card.sop2) + c:RegisterEffect(e6) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.filter1(c,e,tp) + local code=c:GetCode() + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) + and Duel.IsExistingMatchingCard(card.filter2,tp,LOCATION_DECK,0,1,nil,code,e,tp) +end +function card.filter2(c,code,e,tp) + return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:GetCode()~=code and not c:IsCode(210424258) and c:IsAbleToHand() +end +function card.stg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + and Duel.IsExistingTarget(card.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) +end + local rg=Duel.SelectTarget(tp,card.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_TARGET,rg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.sop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local rg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + local code=rg:GetFirst():GetCode() + local g=Duel.SelectMatchingCard(tp,card.filter2,tp,LOCATION_DECK,0,1,1,nil,code,e,tp) + if g:GetCount()>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) +end +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.searchfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() +end +function card.stg2(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.searchfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.sop2(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,card.searchfilter,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 +function card.spfilter(c,e,tp) + return c:IsSetCard(0x666) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function card.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(card.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function card.sumop(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,card.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if g:GetCount()>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) +end +end \ No newline at end of file diff --git a/script/c210424259.lua b/script/c210424259.lua new file mode 100644 index 0000000..2e8f2e0 --- /dev/null +++ b/script/c210424259.lua @@ -0,0 +1,138 @@ +--Moon Burst: Storming +local card = c210424259 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --tohand + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424263) + e1:SetTarget(card.bouncetg) + e1:SetOperation(card.bounceop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --bounce 1, nerf opp by 500 atk + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,210424264) + e4:SetTarget(card.nerftg) + e4:SetOperation(card.nerfop) + c:RegisterEffect(e4) + --Destroys + local e5=Effect.CreateEffect(c) + e5:SetCategory(CATEGORY_DESTROY) + e5:SetProperty(EFFECT_FLAG_CARD_TARGET) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetRange(LOCATION_MZONE) + e5:SetCode(EVENT_BECOME_TARGET) + e5:SetCountLimit(1,210424265) + e5:SetCondition(card.betarget) + e5:SetTarget(card.destg) + e5:SetOperation(card.desop) + c:RegisterEffect(e5) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.desfilter(c) + return c:IsFaceup() and c:IsType(TYPE_MONSTER) +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc~=c and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and card.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.desfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,card.desfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function card.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 +function card.statfilter(c,e,tp) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.atkfilter(c) + return c:IsFaceup() and c:IsType(TYPE_MONSTER) +end +function card.nerftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.statfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.statfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) + and Duel.IsExistingMatchingCard(card.atkfilter,tp,0,LOCATION_MZONE,1,e:GetHandler()) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,card.statfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) +end +function card.nerfop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA+LOCATION_HAND) then + local g=Duel.GetMatchingGroup(card.atkfilter,tp,0,LOCATION_MZONE,nil) + local sc=g:GetFirst() + while sc do + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetValue(-500) + e2:SetReset(RESET_EVENT+0x1fe0000) + sc:RegisterEffect(e2) + local e1=e2:Clone() + e1:SetCode(EFFECT_UPDATE_DEFENSE) + sc:RegisterEffect(e1) + sc=g:GetNext() +end +end +end +function card.filter(c) + return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) and c:IsAbleToHand() +end +function card.bouncetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(card.filter,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g1=Duel.SelectTarget(tp,card.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) + g1:Merge(g2) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) +end +function card.bounceop(e,tp,eg,ep,ev,re,r,rp) +if not e:GetHandler():IsRelateToEffect(e) then return end + local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) + if g:GetCount()>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) +end +end \ No newline at end of file diff --git a/script/c210424260.lua b/script/c210424260.lua new file mode 100644 index 0000000..4d46a7c --- /dev/null +++ b/script/c210424260.lua @@ -0,0 +1,174 @@ +--Moon Burst: The Little Harbinger +local card = c210424260 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424266) + e1:SetTarget(card.atktg) + e1:SetOperation(card.atkop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --on summon, target level/rank 4+ and kill + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e4:SetCountLimit(1,210424267) + e4:SetTarget(card.destg) + e4:SetOperation(card.desop) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e5) + local e6=e4:Clone() + e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS) + c:RegisterEffect(e6) + --change target to def + local e7=Effect.CreateEffect(c) + e7:SetCategory(CATEGORY_POSITION) + e7:SetType(EFFECT_TYPE_QUICK_O) + e7:SetCode(EVENT_BECOME_TARGET) + e7:SetProperty(EFFECT_FLAG_CARD_TARGET) + e7:SetRange(LOCATION_MZONE) + e7:SetCountLimit(1,210424268) + e7:SetCondition(card.betarget) + e7:SetTarget(card.postg) + e7:SetOperation(card.posop) + c:RegisterEffect(e7) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.desfilter(c) + return c:IsFaceup() and c:IsType(TYPE_MONSTER) and (c:IsRankAbove(4) or c:IsLevelAbove(4)) +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc~=c and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and card.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.desfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,card.desfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function card.desop(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 card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end + +function card.filter(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsCanChangePosition() +end +function card.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.filter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g=Duel.SelectTarget(tp,card.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) +end +function card.posop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetValue(1) + e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + tc:RegisterEffect(e1) +end +end +function card.filter1(c,e) + local code=c:GetCode() + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end + if chk==0 then return + Duel.IsExistingTarget(card.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and + Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34016756,0)) + local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) + e:SetLabelObject(g1:GetFirst()) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(34016756,1)) + local g2=Duel.SelectTarget(tp,card.filter1,tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) +end +function card.atkop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local hc=e:GetLabelObject() + local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + local tc=g:GetFirst() + if tc==hc then tc=g:GetNext() end + if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then + local atk=hc:GetAttack() + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_SET_ATTACK_FINAL) + e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetValue(atk/2) + hc:RegisterEffect(e1) + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) + e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e2:SetValue(1) + hc:RegisterEffect(e2) + local e3=Effect.CreateEffect(e:GetHandler()) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e3:SetValue(1) + hc:RegisterEffect(e3) + if not hc:IsImmuneToEffect(e1) then + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e2:SetValue(atk/2) + tc:RegisterEffect(e2) + local e3=Effect.CreateEffect(e:GetHandler()) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) + e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e3:SetValue(1) + tc:RegisterEffect(e3) + local e4=Effect.CreateEffect(e:GetHandler()) + e4:SetType(EFFECT_TYPE_SINGLE) + e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) + e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e4:SetValue(1) + tc:RegisterEffect(e4) +end +end +end \ No newline at end of file diff --git a/script/c210424261.lua b/script/c210424261.lua new file mode 100644 index 0000000..486bac3 --- /dev/null +++ b/script/c210424261.lua @@ -0,0 +1,127 @@ +--Moon Burst: The Helpful Pony +local card = c210424261 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --change position + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_POSITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424269) + e1:SetTarget(card.postg) + e1:SetOperation(card.posop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --NS/Monster Search + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_TOHAND) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetCode(EVENT_SUMMON_SUCCESS) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e4:SetCountLimit(1,210424270) + e4:SetTarget(card.stg) + e4:SetOperation(card.sop) + c:RegisterEffect(e4) + local e5=e4:Clone() + e5:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e5) + --add atk + local e6=Effect.CreateEffect(c) + e6:SetDescription(aux.Stringid(4066,0)) + e6:SetCategory(CATEGORY_ATKCHANGE) + e6:SetType(EFFECT_TYPE_QUICK_O) + e6:SetCode(EVENT_BECOME_TARGET) + e6:SetRange(LOCATION_MZONE) + e6:SetCountLimit(1,210424271) + e6:SetCondition(card.betarget) + e6:SetOperation(card.atkop) + c:RegisterEffect(e6) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.atkfilter(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(card.atkfilter,tp,LOCATION_MZONE,0,nil) + local tc=g:GetFirst() + while tc do + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(500) + e1:SetLabelObject(tc) + e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + tc:RegisterEffect(e1) + tc=g:GetNext() +end +end +function card.sfilter(c,tpe) + return c:IsSetCard(0x666) and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() +end +function card.stg(e,tp,eg,ep,ev,re,r,rp,chk) + local tpe=e:GetLabel() + if chk==0 then return Duel.IsExistingMatchingCard(card.sfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,tpe) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) +end +function card.sop(e,tp,eg,ep,ev,re,r,rp) + local tpe=e:GetLabel() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,card.sfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,tpe) + if g:GetCount()>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) +end +end +function card.filter1(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:IsCanChangePosition() +end +function card.filter2(c) + return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanChangePosition() +end +function card.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(card.filter1,tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(card.filter2,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g1=Duel.SelectTarget(tp,card.filter1,tp,LOCATION_MZONE,0,1,1,nil,ft) + e:SetLabelObject(g1:GetFirst()) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + local g2=Duel.SelectTarget(tp,card.filter2,tp,0,LOCATION_MZONE,1,1,nil) + g1:Merge(g2) + Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,2,0,0) +end +function card.posop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + if g:GetCount()==2 then + Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) +end +end \ No newline at end of file diff --git a/script/c210424262.lua b/script/c210424262.lua new file mode 100644 index 0000000..8c15178 --- /dev/null +++ b/script/c210424262.lua @@ -0,0 +1,140 @@ +--Moon Burst: The Tiny Pony +local card = c210424262 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --Destroy + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424272) + e1:SetTarget(card.destg) + e1:SetOperation(card.desop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --swap + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(4066,0)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_BECOME_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,210424273) + e4:SetCondition(card.betarget) + e4:SetTarget(card.swaptg) + e4:SetOperation(card.swapop) + c:RegisterEffect(e4) + --pierce + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(4066,3)) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetRange(LOCATION_MZONE) + e5:SetCode(EVENT_BECOME_TARGET) + e5:SetProperty(EFFECT_FLAG_CARD_TARGET) + e5:SetCountLimit(1,210424273) + e5:SetCondition(card.betarget) + e5:SetTarget(card.piercetg) + e5:SetOperation(card.pierceop) + c:RegisterEffect(e5) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.piercefilter(c) + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x666) +end +function card.piercetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.piercefilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.piercefilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,card.piercefilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function card.pierceop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PIERCE) + e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + tc:RegisterEffect(e1) +end +end + +function card.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x666) +end +function card.swaptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and card.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(card.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,card.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) +end +function card.swapop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) +end + if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if not Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) +end +end +end +function card.thfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:IsDestructable() and c:IsFaceup() +end +function card.desfilter(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) +end +function card.desfilter2(c) + return c:IsFaceup() +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return false end + if chk==0 then return Duel.IsExistingTarget(card.desfilter,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingTarget(card.desfilter2,tp,0,LOCATION_ONFIELD,1,nil) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g1=Duel.SelectTarget(tp,card.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g2=Duel.SelectTarget(tp,card.desfilter2,tp,0,LOCATION_ONFIELD,1,1,nil) + g1:Merge(g2) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) +end +function card.desop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) + if g:GetCount()>0 then + Duel.Destroy(g,REASON_EFFECT) +end +end \ No newline at end of file diff --git a/script/c210424263.lua b/script/c210424263.lua new file mode 100644 index 0000000..8f7abe2 --- /dev/null +++ b/script/c210424263.lua @@ -0,0 +1,142 @@ +--Moon Burst: The Precocious +local card = c210424263 +function card.initial_effect(c) + --pendulum summon + aux.EnablePendulumAttribute(c) + --atk up + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetCategory(CATEGORY_ATKCHANGE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,210424274) + e1:SetTarget(card.atktg) + e1:SetOperation(card.atkop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BE_BATTLE_TARGET) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e2:SetCondition(card.battlecon) + c:RegisterEffect(e2) + local e3=e1:Clone() + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_CHAIN_SOLVING) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCondition(card.targetcon) + c:RegisterEffect(e3) + --swap + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(4066,0)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_BECOME_TARGET) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,210424275) + e4:SetCondition(card.betarget) + e4:SetTarget(card.swaptg) + e4:SetOperation(card.swapop) + c:RegisterEffect(e4) + --extra swing + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(4066,4)) + e5:SetType(EFFECT_TYPE_QUICK_O) + e5:SetCode(EVENT_BECOME_TARGET) + e5:SetProperty(EFFECT_FLAG_CARD_TARGET) + e5:SetRange(LOCATION_MZONE) + e5:SetCountLimit(1,210424275) + e5:SetCondition(card.betarget) + e5:SetTarget(card.xswingtg) + e5:SetOperation(card.xswingop) + c:RegisterEffect(e5) +end +function card.pendfilter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.targetcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.pendfilter,1,nil,tp) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local ec=eg:GetFirst() + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x666) +end +function card.thfilter(c,e,tp) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) +end + function card.xswingtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.thfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + Duel.SelectTarget(tp,card.thfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function card.xswingop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_EXTRA_ATTACK) + e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + e1:SetValue(1) + tc:RegisterEffect(e1) +end +end +function card.spfilter(c,e,tp) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.swaptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and card.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(card.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) +end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,card.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) +end +function card.swapop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) +end + if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + if not Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then + Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) +end +end +end +function card.atkfilter(c) + return c:IsFaceup() and c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) +end +function card.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and card.atkfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.atkfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local g=Duel.SelectTarget(tp,card.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,1,0,0) +end +function card.atkop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + local e2=Effect.CreateEffect(e:GetHandler()) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_SET_ATTACK_FINAL) + e2:SetValue(tc:GetAttack()*2) + e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + tc:RegisterEffect(e2) + local e3=Effect.CreateEffect(e:GetHandler()) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_SET_DEFENSE_FINAL) + e3:SetValue(tc:GetDefense()*.5) + e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + tc:RegisterEffect(e3) +end +end \ No newline at end of file diff --git a/script/c210424264.lua b/script/c210424264.lua new file mode 100644 index 0000000..6004ab5 --- /dev/null +++ b/script/c210424264.lua @@ -0,0 +1,109 @@ +--Lunar Guardian's Blessing +local card = c210424264 +function card.initial_effect(c) +c:EnableCounterPermit(0x99) +c:SetCounterLimit(0x99,15) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_COUNTER) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(card.target) + e1:SetOperation(card.activate) + c:RegisterEffect(e1) + --add counter + local e2=Effect.CreateEffect(c) + e2:SetCategory(CATEGORY_COUNTER) + e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e2:SetCode(EVENT_BECOME_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCondition(card.accon) + e2:SetOperation(card.acop) + c:RegisterEffect(e2) + --to hand + local e3=Effect.CreateEffect(c) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1) + e3:SetCost(card.thcost) + e3:SetTarget(card.thtg) + e3:SetOperation(card.thop) + c:RegisterEffect(e3) + --destroy replace + local e4=Effect.CreateEffect(c) + e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e4:SetCode(EFFECT_DESTROY_REPLACE) + e4:SetRange(LOCATION_SZONE) + e4:SetTarget(card.destg) + e4:SetValue(card.value) + e4:SetOperation(card.desop) + c:RegisterEffect(e4) +end +function card.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsCanAddCounter(tp,0x99,3,e:GetHandler()) +end + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x99) +end +function card.activate(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + c:AddCounter(0x99,3) +end +end +function card.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x99,5,REASON_COST) + end + e:GetHandler():RemoveCounter(tp,0x99,5,REASON_COST) +end +function card.thfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) and c:IsAbleToHand() +end +function card.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.thfilter,tp,LOCATION_DECK,0,1,nil) +end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.thop(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,card.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 +function card.dfilter(c,tp) + return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and not c:IsReason(REASON_REPLACE) and c:IsType(TYPE_SPELL+TYPE_TRAP) + and c:IsSetCard(0x666) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then + local count=eg:FilterCount(card.dfilter,nil,tp) + e:SetLabel(count) + return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x99,count*3,REASON_EFFECT) +end + return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) +end +function card.value(e,c) + return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and c:IsType(TYPE_SPELL+TYPE_TRAP) + and c:IsSetCard(0x666) and c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_EFFECT) +end +function card.desop(e,tp,eg,ep,ev,re,r,rp) + local count=e:GetLabel() + Duel.RemoveCounter(tp,1,0,0x99,count*3,REASON_EFFECT) +end +function card.filter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x666) +end +function card.accon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false +end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.filter,1,nil,tp) +end +function card.acop(e,tp,eg,ep,ev,re,r,rp) + e:GetHandler():AddCounter(0x99,1) +end \ No newline at end of file diff --git a/script/c210424265.lua b/script/c210424265.lua new file mode 100644 index 0000000..f51c5b8 --- /dev/null +++ b/script/c210424265.lua @@ -0,0 +1,112 @@ +--Moon Burst's Big Bang +local card = c210424265 +function card.initial_effect(c) + c:EnableCounterPermit(0xc) + c:SetCounterLimit(0xc,3) + --activate + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e1) + --add counter + local e2=Effect.CreateEffect(c) + e2:SetCategory(CATEGORY_COUNTER) + e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) + e2:SetCode(EVENT_BECOME_TARGET) + e2:SetRange(LOCATION_SZONE) + e2:SetCondition(card.accon) + e2:SetOperation(card.acop) + c:RegisterEffect(e2) + --destroy&damage + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(210424265,0)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e3:SetRange(LOCATION_SZONE) + e3:SetCode(EVENT_CUSTOM+210424265) + e3:SetCost(card.descost) + e3:SetTarget(card.destg) + e3:SetOperation(card.desop) + c:RegisterEffect(e3) + --atkup + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_ATKCHANGE) + e4:SetDescription(aux.Stringid(4066,5)) + e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_ATTACK_ANNOUNCE) + e4:SetRange(LOCATION_SZONE) + e4:SetCondition(card.battlecon) + e4:SetTarget(card.tg1) + e4:SetOperation(card.op1) + c:RegisterEffect(e4) +end +function card.battlecon(e,tp,eg,ep,ev,re,r,rp) + local a=Duel.GetAttacker() + local d=Duel.GetAttackTarget() + if d and a:GetControler()~=d:GetControler() then + if a:IsControler(tp) then e:SetLabelObject(a) + else e:SetLabelObject(d) end + return true + else return false end +end +function card.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local tc=e:GetLabelObject() + if chkc then return chkc==tc end + if chk==0 then return tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsSetCard(0x666) end + Duel.SetTargetCard(tc) +end +function card.op1(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) + e1:SetValue(300) + tc:RegisterEffect(e1) +end +end +function card.ctop2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local ct=c:GetCounter(0xc) + c:RemoveCounter(tp,0xc,ct,REASON_EFFECT) +end +function card.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler() and e:GetHandler():GetCounter(0xc)==3 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + e:GetHandler():RemoveCounter(tp,0xc,3,REASON_COST) +end +function card.desfilter(c) + return c:IsDestructable() +end +function card.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:GetLocation()==LOCATION_ONFIELD and card.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(card.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,card.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function card.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 +function card.filter(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x666) +end +function card.accon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.filter,1,nil,tp) +end +function card.acop(e,tp,eg,ep,ev,re,r,rp) +local c=e:GetHandler() + e:GetHandler() c:AddCounter(0xc,1) + if c:GetCounter(0xc)==3 then + Duel.RaiseSingleEvent(c,EVENT_CUSTOM+210424265,re,0,0,p,0) +end +end \ No newline at end of file diff --git a/script/c210424266.lua b/script/c210424266.lua new file mode 100644 index 0000000..2ef9a9c --- /dev/null +++ b/script/c210424266.lua @@ -0,0 +1,73 @@ +--Battle in the Storm +local card = c210424266 +function card.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetTarget(card.target) + e1:SetOperation(card.activate) + c:RegisterEffect(e1) + --cannot be target + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetRange(LOCATION_FZONE) + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2:SetTargetRange(LOCATION_PZONE,0) + e2:SetTarget(card.tgtg) + e2:SetValue(aux.tgoval) + c:RegisterEffect(e2) + --Send 2 ponies from extra to grave, kill 1 + local e3=Effect.CreateEffect(c) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_FZONE) + e3:SetCountLimit(1) + e3:SetCost(card.descost) + e3:SetTarget(card.destarget) + e3:SetOperation(card.desop) + c:RegisterEffect(e3) +end +function card.desfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGraveAsCost() and c:IsFaceup() +end +function card.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.desfilter,tp,LOCATION_EXTRA,0,2,nil) end + local g=Duel.SelectMatchingCard(tp,card.desfilter,tp,LOCATION_EXTRA,0,2,2,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function card.destarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDestroy,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,Card.IsAbleToDestroy,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function card.desop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + local tc=Duel.GetFirstTarget() + if tc and tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) +end +end +function card.tgtg(e,c) + return c:IsSetCard(0x666) +end +function card.sfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() +end +function card.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.sfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.activate(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,card.sfilter,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 \ No newline at end of file diff --git a/script/c210424267.lua b/script/c210424267.lua new file mode 100644 index 0000000..d8996c5 --- /dev/null +++ b/script/c210424267.lua @@ -0,0 +1,59 @@ +--Moon Burst's Reaction +local card = c210424267 +function card.initial_effect(c) + --indes + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e1) + --indestructable + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCode(EFFECT_IMMUNE_EFFECT) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x666)) + e2:SetValue(card.efilter) + c:RegisterEffect(e2) + --move card to scale + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_GRAVE) + e3:SetCondition(card.pencon) + e3:SetCost(aux.bfgcost) + e3:SetTarget(card.pentg) + e3:SetOperation(card.penop) + c:RegisterEffect(e3) +end +function card.efilter(e,te) + return not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) + and te:GetOwnerPlayer()~=e:GetOwnerPlayer() +end +function card.filter(c) + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x666) and not c:IsForbidden() +end +function card.pencon(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN) + and Duel.IsExistingMatchingCard(card.filter,tp,LOCATION_DECK,0,1,nil) +end +function card.pentg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end +end +function card.penop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(card.filter,tp,LOCATION_DECK,0,nil) + local ct=0 + if Duel.CheckLocation(tp,LOCATION_PZONE,0) then ct=ct+1 end + if Duel.CheckLocation(tp,LOCATION_PZONE,1) then ct=ct+1 end + if ct>0 and g:GetCount()>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local sg=g:Select(tp,1,ct,nil) + local sc=sg:GetFirst() + while sc do + Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) + sc=sg:GetNext() +end +end +end \ No newline at end of file diff --git a/script/c210424268.lua b/script/c210424268.lua new file mode 100644 index 0000000..83c0712 --- /dev/null +++ b/script/c210424268.lua @@ -0,0 +1,82 @@ +--Moon Burst: Child of Night +local card = c210424268 +function card.initial_effect(c) + c:EnableReviveLimit() + aux.AddLinkProcedure(c,card.lfilter,2,2) + c:SetUniqueOnField(1,0,210424268) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCondition(card.spcon) + e1:SetTarget(card.sptg) + e1:SetOperation(card.spop) + c:RegisterEffect(e1) + --Search + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(4066,0)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_QUICK_F) + e2:SetCode(EVENT_BECOME_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,210424276) + e2:SetCondition(card.betarget) + e2:SetTarget(card.stg) + e2:SetOperation(card.sop) + c:RegisterEffect(e2) +end +function card.lfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) +end +function card.filter2(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.filter2,1,nil,tp) +end +function card.searchfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() +end +function card.stg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.searchfilter,tp,LOCATION_DECK,0,1,nil) + end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.sop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,card.searchfilter,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 +function card.filter(c,e,tp) + return c:IsCode(210424269) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function card.spfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGrave() and c:IsFaceup() +end +function card.spcon(e,tp,eg,ep,ev,re,r,rp) + return rp~=tp and e:GetHandler():GetPreviousControler()==tp +end +function card.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(card.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(card.spfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) +end +function card.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.SelectMatchingCard(tp,card.spfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.SendtoGrave(g,REASON_Effect) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,card.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) + if g:GetCount()>0 then + Duel.SpecialSummon(g,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) + g:GetFirst():CompleteProcedure() +end +end \ No newline at end of file diff --git a/script/c210424269.lua b/script/c210424269.lua new file mode 100644 index 0000000..662a155 --- /dev/null +++ b/script/c210424269.lua @@ -0,0 +1,82 @@ +--Moon Burst: Child of Light +local card = c210424269 +function card.initial_effect(c) + c:EnableReviveLimit() + aux.AddLinkProcedure(c,card.lfilter,2,2) + c:SetUniqueOnField(1,0,210424269) + --special summon + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e1:SetCode(EVENT_DESTROYED) + e1:SetCondition(card.spcon) + e1:SetTarget(card.sptg) + e1:SetOperation(card.spop) + c:RegisterEffect(e1) + --Search + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(4066,0)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_QUICK_F) + e2:SetCode(EVENT_BECOME_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,210424277) + e2:SetCondition(card.betarget) + e2:SetTarget(card.stg) + e2:SetOperation(card.sop) + c:RegisterEffect(e2) +end +function card.lfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) +end +function card.filter2(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.filter2,1,nil,tp) +end +function card.searchfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() +end +function card.stg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(card.searchfilter,tp,LOCATION_DECK,0,1,nil) +end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function card.sop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,card.searchfilter,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 +function card.filter(c,e,tp) + return c:IsCode(210424268) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function card.spfilter(c) + return c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGrave() and c:IsFaceup() +end +function card.spcon(e,tp,eg,ep,ev,re,r,rp) + return rp~=tp and e:GetHandler():GetPreviousControler()==tp +end +function card.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(card.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(card.spfilter,tp,LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) +end +function card.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local g=Duel.SelectMatchingCard(tp,card.spfilter,tp,LOCATION_EXTRA,0,1,1,nil) + Duel.SendtoGrave(g,REASON_Effect) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,card.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) + if g:GetCount()>0 then + Duel.SpecialSummon(g,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) + g:GetFirst():CompleteProcedure() +end +end \ No newline at end of file diff --git a/script/c210424270.lua b/script/c210424270.lua new file mode 100644 index 0000000..cbe2b54 --- /dev/null +++ b/script/c210424270.lua @@ -0,0 +1,48 @@ +--Moon Burst: Holder of Power +local card = c210424270 +function card.initial_effect(c) + --link summon + aux.AddLinkProcedure(c,card.lfilter,3,3) + c:EnableReviveLimit() + --indes + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2) + --atk up + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(4066,0)) + e3:SetCategory(CATEGORY_ATKCHANGE) + e3:SetType(EFFECT_TYPE_QUICK_F) + e3:SetCode(EVENT_BECOME_TARGET) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(card.atkcon) + e3:SetOperation(card.atkop) + c:RegisterEffect(e3) +end +function card.lfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) +end +function card.filter2(c,tp) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x666) +end +function card.atkcon(e,tp,eg,ep,ev,re,r,rp) + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) + return g and g:IsExists(card.filter2,1,nil,tp) +end +function card.atkop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetValue(200) + e1:SetReset(RESET_EVENT+0x1ff0000) + c:RegisterEffect(e1) +end \ No newline at end of file diff --git a/script/c210424271.lua b/script/c210424271.lua new file mode 100644 index 0000000..511f9c0 --- /dev/null +++ b/script/c210424271.lua @@ -0,0 +1,53 @@ +--Moon Burst: Holder of Courage +local card = c210424271 +function card.initial_effect(c) + --link summon + aux.AddLinkProcedure(c,card.lfilter,3,3) + c:EnableReviveLimit() + --indes + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e1:SetValue(1) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + c:RegisterEffect(e2) + --multi attack + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_EXTRA_ATTACK) + e3:SetValue(1) + c:RegisterEffect(e3) + --remove + local e4=Effect.CreateEffect(c) + e4:SetCategory(CATEGORY_REMOVE) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e4:SetCode(EVENT_BATTLED) + e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e4:SetCondition(card.rmcon) + e4:SetTarget(card.rmtg) + e4:SetOperation(card.rmop) + c:RegisterEffect(e4) +end +function card.lfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) +end +function card.rmcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local bc=c:GetBattleTarget() + e:SetLabelObject(bc) + return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) +end +function card.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0) +end +function card.rmop(e,tp,eg,ep,ev,re,r,rp) + local bc=e:GetLabelObject() + if bc:IsRelateToBattle() and bc:IsAbleToRemove() then + Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) +end +end \ No newline at end of file diff --git a/script/c210424272.lua b/script/c210424272.lua new file mode 100644 index 0000000..492900a --- /dev/null +++ b/script/c210424272.lua @@ -0,0 +1,69 @@ +--Moon Burst: The Bad Dream +local card = c210424272 +function card.initial_effect(c) + --link summon + aux.AddLinkProcedure(c,card.lfilter,1,1) + c:EnableReviveLimit() + --special summon + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_DRAW) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e1:SetCountLimit(1,210424278) + e1:SetCondition(card.spcon) + e1:SetTarget(card.sptg) + e1:SetOperation(card.spop) + c:RegisterEffect(e1) + --send to deck, draw 1 + local e3=Effect.CreateEffect(c) + e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EVENT_BECOME_TARGET) + e3:SetCountLimit(1,210424279) + e3:SetCondition(card.betarget) + e3:SetTarget(card.drawtg) + e3:SetOperation(card.drawop) + c:RegisterEffect(e3) +end +function card.betarget(e,tp,eg,ep,ev,re,r,rp) + return eg:IsContains(e:GetHandler()) +end +function card.drawtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return e:GetHandler():IsAbleToHand() end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) +end +function card.drawop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT) then + Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) + p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end +function card.lfilter(c) + return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x666) and not c:IsCode(210424272) +end +function card.spcon(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) +end +function card.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end + Duel.SetTargetPlayer(tp) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function card.spop(e,tp,eg,ep,ev,re,r,rp) + local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) + if g:GetCount()==0 then return end + Duel.SendtoDeck(g,nil,2,REASON_EFFECT) + Duel.ShuffleDeck(p) + Duel.BreakEffect() + Duel.Draw(p,g:GetCount(),REASON_EFFECT) +end \ No newline at end of file