Commit ef43e6f8 authored by HidarimeYume's avatar HidarimeYume

23.10.21 yume fix&upd

parent 8baf480a
No preview for this file type
expansions/pics/71401008.jpg

610 KB | W: | H:

expansions/pics/71401008.jpg

610 KB | W: | H:

expansions/pics/71401008.jpg
expansions/pics/71401008.jpg
expansions/pics/71401008.jpg
expansions/pics/71401008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401009.jpg

606 KB | W: | H:

expansions/pics/71401009.jpg

606 KB | W: | H:

expansions/pics/71401009.jpg
expansions/pics/71401009.jpg
expansions/pics/71401009.jpg
expansions/pics/71401009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401012.jpg

597 KB | W: | H:

expansions/pics/71401012.jpg

596 KB | W: | H:

expansions/pics/71401012.jpg
expansions/pics/71401012.jpg
expansions/pics/71401012.jpg
expansions/pics/71401012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401014.jpg

602 KB | W: | H:

expansions/pics/71401014.jpg

602 KB | W: | H:

expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
expansions/pics/71401014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401015.jpg

568 KB | W: | H:

expansions/pics/71401015.jpg

567 KB | W: | H:

expansions/pics/71401015.jpg
expansions/pics/71401015.jpg
expansions/pics/71401015.jpg
expansions/pics/71401015.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401016.jpg

588 KB | W: | H:

expansions/pics/71401016.jpg

588 KB | W: | H:

expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
expansions/pics/71401016.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71401017.jpg

581 KB | W: | H:

expansions/pics/71401017.jpg

581 KB | W: | H:

expansions/pics/71401017.jpg
expansions/pics/71401017.jpg
expansions/pics/71401017.jpg
expansions/pics/71401017.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -42,7 +42,7 @@ function c71401002.op2(e,tp,eg,ep,ev,re,r,rp)
if tc then
local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401002,1))==0) then
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401001,5))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
......
......@@ -43,13 +43,13 @@ function c71401003.filter2a(c)
end
function c71401003.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71401003.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
local flag=0
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401003,1))==0) then
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401001,4))==0) then
flag=Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
......@@ -65,7 +65,7 @@ function c71401003.op2(e,tp,eg,ep,ev,re,r,rp)
end
end
local rg=Duel.GetMatchingGroup(c71401003.filter2a,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if flag>0 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401003,2)) then
if flag>0 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401003,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local srg=rg:Select(tp,1,1,nil)
......
......@@ -6,7 +6,7 @@ function c71401004.initial_effect(c)
local e0a=yume.AddThisCardBanishedAlreadyCheck(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401004,0))
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -30,7 +30,7 @@ function c71401004.initial_effect(c)
c:RegisterEffect(e1b)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401004,1))
e2:SetDescription(aux.Stringid(71401004,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
......
......@@ -42,7 +42,7 @@ end
function c71401005.op2(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,c71401005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71401005.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local rg=Duel.GetMatchingGroup(c71401005.filter2a,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(c71401005.filter2b,tp,LOCATION_ONFIELD,0,1,nil) and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401005,1)) then
......
......@@ -3,7 +3,7 @@ if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401007.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401007,0))
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -17,7 +17,7 @@ function c71401007.initial_effect(c)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401007,1))
e2:SetDescription(aux.Stringid(71401007,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
......@@ -68,7 +68,7 @@ function c71401007.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(c71401007.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,2)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401007,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
......
......@@ -58,10 +58,10 @@ end
function c71401008.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c71401008.filter2,tp,LOCATION_DECK,0,1,1,nil,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71401008.filter2),tp,LOCATION_DECK,0,1,1,nil,nil,tp):GetFirst()
if tc then
local c=e:GetHandler()
local ctype=Duel.SelectOption(tp,aux.Stringid(71401008,2),aux.Stringid(71401008,3))==0 and TYPE_SPELL or TYPE_TRAP
local ctype=Duel.SelectOption(tp,aux.Stringid(71401001,4),aux.Stringid(71401001,5))==0 and TYPE_SPELL or TYPE_TRAP
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
......@@ -105,7 +105,7 @@ function c71401008.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c71401008.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
......
......@@ -96,10 +96,10 @@ end
function c71401010.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c71401010.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71401010.filter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
if tc then
local c=e:GetHandler()
local ctype=Duel.SelectOption(tp,aux.Stringid(71401010,2),aux.Stringid(71401010,3))==0 and TYPE_SPELL or TYPE_TRAP
local ctype=Duel.SelectOption(tp,aux.Stringid(71401001,4),aux.Stringid(71401001,5))==0 and TYPE_SPELL or TYPE_TRAP
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
......@@ -110,7 +110,7 @@ function c71401010.op3(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(71401010,4)) then
and Duel.SelectYesNo(tp,aux.Stringid(71401010,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -3,7 +3,7 @@ if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401011.initial_effect(c)
--self special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401011,0))
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
......@@ -14,7 +14,7 @@ function c71401011.initial_effect(c)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401011,1))
e2:SetDescription(aux.Stringid(71401011,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
......
......@@ -32,7 +32,7 @@ function c71401012.con1(e,tp,eg,ep,ev,re,r,rp)
end
function c71401012.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS and Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
......@@ -67,7 +67,7 @@ function c71401012.op2(e,tp,eg,ep,ev,re,r,rp)
if oc then
local b1=oc:IsAbleToHand()
local b2=not oc:IsForbidden() and oc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401012,2))==0) then
if b1 and (not b2 or Duel.SelectOption(tp,1190,aux.Stringid(71401001,4))==0) then
Duel.SendtoHand(oc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,oc)
else
......
......@@ -30,7 +30,7 @@ function c71401013.initial_effect(c)
yume.ButterflyCounter()
end
function c71401013.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c71401013.filterc2(c)
return c:IsFaceup() and c:GetType() & 0x20004==0x20004 and c:IsAbleToRemoveAsCost()
......@@ -68,6 +68,7 @@ function c71401013.op2(e,tp,eg,ep,ev,re,r,rp)
end
local dg=Duel.GetDecktopGroup(tp,5)
if Duel.IsExistingMatchingCard(c71401013.filter2,tp,LOCATION_ONFIELD,0,1,nil) and dg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==5 and Duel.SelectYesNo(tp,aux.Stringid(71401013,1)) then
Duel.DisableShuffleCheck()
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
......
......@@ -74,7 +74,7 @@ function c71401014.op2(e,tp,eg,ep,ev,re,r,rp)
local rg1=mg:Select(tp,1,1,c)
local rc1=rg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,Group.FromCards(rc1,c),tp,POS_FACEDOWN)
local rg2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToRemove),0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,Group.FromCards(rc1,c),tp,POS_FACEDOWN)
rg2:AddCard(rc1)
Duel.Remove(rg2,POS_FACEDOWN,REASON_EFFECT)
end
......
......@@ -77,7 +77,7 @@ function c71401015.op2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ct>ft then ct=ft end
local mg=Duel.GetMatchingGroup(c71401015.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,tp)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c71401015.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,tp)
if ct>0 and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401015,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -72,7 +72,7 @@ function c71401016.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c71401016.filter2,tp,LOCATION_EXTRA,0,1,1,nil,tp):GetFirst()
if tc then
local c=e:GetHandler()
local ctype=Duel.SelectOption(tp,aux.Stringid(71401016,2),aux.Stringid(71401016,3))==0 and TYPE_SPELL or TYPE_TRAP
local ctype=Duel.SelectOption(tp,aux.Stringid(71401001,4),aux.Stringid(71401001,5))==0 and TYPE_SPELL or TYPE_TRAP
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
......@@ -84,7 +84,7 @@ function c71401016.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,1,nil,tp,POS_FACEDOWN)
if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(71401016,4)) then
and Duel.SelectYesNo(tp,aux.Stringid(71401016,2)) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e2=Effect.CreateEffect(c)
......@@ -117,7 +117,7 @@ end
function c71401016.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c71401016.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71401016.filter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,1,nil,tp,POS_FACEDOWN)
......
......@@ -70,7 +70,7 @@ function c71401017.op2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
local mg=Duel.GetMatchingGroup(c71401017.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,tp)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c71401017.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401017,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--花忆-「循」
if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401018.initial_effect(c)
--place
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,71401018)
e1:SetCost(yume.ButterflyLimitCost)
e1:SetCondition(c71401018.con1)
e1:SetTarget(yume.ButterflyPlaceTg)
e1:SetOperation(yume.ButterflyTrapOp)
c:RegisterEffect(e1)
local e1a = e1:Clone()
e1a:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e1a)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401013,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,71501018)
e2:SetCondition(c71401018.con2)
e2:SetCost(c71401018.cost2)
e2:SetTarget(c71401018.tg2)
e2:SetOperation(c71401018.op2)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401018.filter1(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER)
and (not c:IsPreviousLocation(LOCATION_ONFIELD) or c:IsPreviousLocation(LOCATION_MZONE))
end
function c71401018.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71401018.filter1,1,nil)
end
function c71401018.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c71401018.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,2)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEUP)==2 and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
Duel.DiscardDeck(tp,3,REASON_COST)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401018.filterc2(c)
return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function c71401018.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=Duel.GetDecktopGroup(1-tp,2)
if chk==0 then return tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEUP)==2 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_DECK)
end
function c71401018.filter2a(c)
return c:IsFaceup() and c:GetType() & 0x20004==0x20004
end
function c71401018.filter2b(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end
function c71401018.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetDecktopGroup(1-tp,2)
if #tg==0 then return end
Duel.DisableShuffleCheck()
local og=Duel.GetMatchingGroup(aux.NecroValleyFilter(c71401018.filter2b),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c71401018.filter2a,tp,LOCATION_ONFIELD,0,1,c)
and og:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71401018,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local oc=og:Select(tp,1,1,nil):GetFirst()
if oc then
local b1=oc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local b2=not oc:IsForbidden() and oc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1152,aux.Stringid(71401001,5))==0) then
Duel.SpecialSummon(oc,0,tp,tp,false,false,POS_FACEUP)
else
if Duel.MoveToField(oc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
oc:RegisterEffect(e1)
end
end
end
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment