Commit 4b168380 authored by POLYMER's avatar POLYMER

fix

parent 56323a09
......@@ -57,7 +57,7 @@ function c10200026.op2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,10200026)
ct=ct+1
Duel.RegisterFlagEffect(tp,10200026,RESET_PHASE+PHASE_END,0,1,ct)
if Duel.SelectYesNo(tp, aux.Stringid(10200026,3)) then
if Duel.SelectYesNo(tp,aux.Stringid(10200026,3)) then
if ct >= 1 then
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g1) do
......@@ -68,9 +68,11 @@ function c10200026.op2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
e:GetHandler():RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(10200026,4))
end
if ct >= 2 then
Duel.Damage(1-tp,500,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(10200026,5))
end
if ct >= 3 then
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......@@ -82,9 +84,11 @@ function c10200026.op2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
e:GetHandler():RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(10200026,6))
end
if ct >= 4 then
Duel.Draw(tp,1,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(10200026,7))
end
if ct >= 5 then
local g3=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
......@@ -93,6 +97,7 @@ function c10200026.op2(e,tp,eg,ep,ev,re,r,rp)
local sg=g3:Select(tp,1,1,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(0,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(10200026,8))
end
end
end
\ No newline at end of file
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.SpiritReturnReg)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.SpiritReturnReg)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -65,20 +65,20 @@ function cm.SpiritReturnReg(e,tp,eg,ep,ev,re,r,rp)
e2:SetTarget(Auxiliary.SpiritReturnTargetOptional)
c:RegisterEffect(e2)
end
function cm.cpfilter(c,tp)
return c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.IsExistingMatchingCard(cm.cpfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp,c)
function cm.cpfilter(c,e,tp)
return c:IsFaceup() and c:IsAbleToHandAsCost() and Duel.IsExistingMatchingCard(cm.cpfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e,tp,c)
end
function cm.cpfilter2(c,tp,tc)
function cm.cpfilter2(c,e,tp,tc)
local fg=Group.FromCards(c,tc)
return c:IsFacedown() and c:IsAbleToHandAsCost() and Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,fg,e,tp,fg)
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) and e:GetHandler():GetFlagEffect(m)==0 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp) and e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc2=Duel.SelectMatchingCard(tp,cm.cpfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,tc):GetFirst()
local tc2=Duel.SelectMatchingCard(tp,cm.cpfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp,tc):GetFirst()
local fg=Group.FromCards(tc,tc2)
--Debug.Message(Duel.GetMatchingGroupCount(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,fg,e,tp,fg))
Duel.SendtoHand(fg,nil,REASON_COST)
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.SpiritReturnReg)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.SpiritReturnReg)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(cm.SpiritReturnReg)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -45,7 +45,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......
......@@ -46,7 +46,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......
......@@ -44,7 +44,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......
......@@ -46,7 +46,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......
......@@ -46,7 +46,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......@@ -201,7 +203,8 @@ function cm.returntofield(tc,e)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
local rc=tc:GetReasonEffect():GetOwner() or tc
local rc=tc
if tc:GetReasonEffect() then rc=tc:GetReasonEffect():GetOwner() end
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(m)
......
......@@ -41,7 +41,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
tc:ResetFlagEffect(11451718)
local rc=tc
if tc:GetReasonEffect() and tc:GetReasonEffect():GetOwner() then rc=tc:GetReasonEffect():GetOwner() end
if tc:GetReasonEffect() then rc=tc:GetReasonEffect():GetOwner() end
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(m)
......
......@@ -58,7 +58,9 @@ end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE)
......
......@@ -22,6 +22,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SendtoHand(c,1-tp,REASON_COST)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -68,7 +68,7 @@ function cm.fil3(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsFaceup()
end
function cm.fil4(c)
return c:IsOriginalCodeRule(60010252) and c:IsFaceup() and c:IsReleasable() and c:IsCanBeFusionMaterial()
return c:IsOriginalCodeRule(60010252) and c:IsReleasable() and c:IsCanBeFusionMaterial()
end
function cm.spcon(e,c)
local tp=e:GetHandlerPlayer()
......
......@@ -55,6 +55,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local fc=Duel.SelectMatchingCard(tp,cm.mfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,re:GetHandler()):GetFirst()
local fg=Group.FromCards(re:GetHandler(),fc)
c:SetMaterial(fg)
if fg:IsExists(Card.IsFacedown,1,nil) then
Duel.ConfirmCards(1,fg:Filter(Card.IsFacedown,nil))
Duel.ConfirmCards(0,fg:Filter(Card.IsFacedown,nil))
end
if Duel.SendtoGrave(fg,REASON_SPSUMMON)==2 then
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end
......@@ -66,7 +70,7 @@ function cm.mfilter2(c,tc)
and #Group.FromCards(c,tc):Filter(cm.mfilter3,nil)>0
end
function cm.mfilter3(c)
return c:IsCode(60010252) and c:IsFaceup()
return c:IsCode(60010252) --and c:IsFaceup()
end
function cm.uop(e,tp,eg,ep,ev,re,r,rp)
......
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