Commit 5aceb926 authored by POLYMER's avatar POLYMER

fix

parent 00e5a2a7
......@@ -49,6 +49,7 @@ function cm.SpiritReturnReg(e,tp,eg,ep,ev,re,r,rp)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
......@@ -84,28 +85,36 @@ end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local dg=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local dg=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:IsCanChangePosition() end,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if #g>0 and #dg>0 and ((c:IsLocation(LOCATION_HAND) and loc==LOCATION_HAND and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(m,0))) or (c:IsOnField() and loc&LOCATION_ONFIELD>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(m,0)))) then
Duel.Hint(HINT_CARD,0,m)
if c:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
g=g:Select(tp,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop)
else
Duel.MSet(tp,tc,true,nil)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop2)
end
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(cm.smop)
e1:SetReset(RESET_CHAIN)
e1:SetLabel(Duel.GetCurrentChain())
Duel.RegisterEffect(e1,tp)
end
end
function cm.smop(e,tp,eg,ep,ev,re,r,rp)
if ev~=e:GetLabel() then return end
local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
g=g:Select(tp,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end
end
end
......@@ -136,6 +145,10 @@ function cm.repop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.repop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:IsCanChangePosition() end,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
function cm.rscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==e:GetLabel()-1
end
......
......@@ -22,12 +22,14 @@ function cm.initial_effect(c)
cm.global_check=true
local _MoveToField=Duel.MoveToField
local _ReturnToField=Duel.ReturnToField
local _IsCanOverlay=Card.IsCanOverlay
local _Overlay=Duel.Overlay
local _Equip=Duel.Equip
function Duel.MoveToField(c,tp,...)
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return
return false
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
if not cm.spcost(nil,nil,tp,c) then return false end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _MoveToField(c,tp,...)
......@@ -35,18 +37,45 @@ function cm.initial_effect(c)
function Duel.ReturnToField(c,...)
local tp=c:GetPreviousControler()
if c:IsHasEffect(m) then
return
return false
elseif c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
if not cm.spcost(nil,nil,tp,c) then return false end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _ReturnToField(c,...)
end
function Card.IsCanOverlay(c,...)
local tp=c:GetPreviousControler()
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return false
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return false end
end
return _IsCanOverlay(c,...)
end
function Duel.Overlay(xc,v,...)
local t=Auxiliary.GetValueType(v)
local g=Group.CreateGroup()
if t=="Card" then g:AddCard(v) else g=v end
for c in aux.Next(g) do
local tp=c:GetPreviousControler()
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
g:RemoveCard(c)
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then
g:RemoveCard(c)
else
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
end
end
return _Overlay(xc,g,...)
end
function Duel.Equip(tp,c,mc,...)
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return
return false
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
if not cm.spcost(nil,nil,tp,c) then return false end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _Equip(tp,c,mc,...)
......
......@@ -33,18 +33,18 @@ function cm.initial_effect(c)
local _Equip=Duel.Equip
function Duel.MoveToField(c,tp,...)
if c:IsLocation(LOCATION_EXTRA) and c:IsHasEffect(m) then
return
return false
elseif c:IsLocation(LOCATION_EXTRA) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
if not cm.spcost(nil,nil,tp,c) then return false end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _MoveToField(c,tp,...)
end
function Duel.Equip(tp,c,mc,...)
if c:IsLocation(LOCATION_EXTRA) and c:IsHasEffect(m) then
return
return false
elseif c:IsLocation(LOCATION_EXTRA) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
if not cm.spcost(nil,nil,tp,c) then return false end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _Equip(tp,c,mc,...)
......
......@@ -69,13 +69,13 @@ end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
Card.SetMaterial(c,sg)
Duel.SendtoGrave(sg,REASON_COST+REASON_MATERIAL)
Duel.SendtoGrave(sg,REASON_SPSUMMON+REASON_MATERIAL)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=re:IsActiveType(TYPE_MONSTER) and Duel.GetFlagEffect(0,m)==0
local b2=re:IsActiveType(TYPE_SPELL) and Duel.GetFlagEffect(0,m-1)==0
local b3=re:IsActiveType(TYPE_TRAP) and Duel.GetFlagEffect(0,m-2)==0
local b1=re:IsActiveType(TYPE_MONSTER) and Duel.GetFlagEffect(tp,m)==0
local b2=re:IsActiveType(TYPE_SPELL) and Duel.GetFlagEffect(tp,m-1)==0
local b3=re:IsActiveType(TYPE_TRAP) and Duel.GetFlagEffect(tp,m-2)==0
return rp==1-tp and Duel.IsChainDisablable(ev) and (Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_REMOVED,0,3,nil) or c:IsAbleToRemove(tp,POS_FACEDOWN)) and (b1 or b2 or b3)
end
function cm.filter2(c)
......@@ -106,13 +106,13 @@ function cm.negop(e,tp,eg,ep,ev,re,r,rp)
end
end
if re:IsActiveType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(0,m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
if re:IsActiveType(TYPE_SPELL) then
Duel.RegisterFlagEffect(0,m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
if re:IsActiveType(TYPE_TRAP) then
Duel.RegisterFlagEffect(0,m-2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
end
......
--去未知处
--21.04.21
local m=11451519
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -85,6 +84,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
......
......@@ -85,6 +85,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
......
......@@ -92,6 +92,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
......
......@@ -84,7 +84,19 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end
cm[1]=nil
return _Merge(sg,obj)
......@@ -96,7 +108,21 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end
_SpecialSummonRule(tp,tc,sumtype)
end
......
......@@ -84,7 +84,19 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end
cm[1]=nil
return _Merge(sg,obj)
......@@ -96,7 +108,21 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end
_SpecialSummonRule(tp,tc,sumtype)
end
......
......@@ -200,7 +200,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetReset(RESET_EVENT+0x4760000)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
......
......@@ -83,7 +83,19 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end
cm[1]=nil
return _Merge(sg,obj)
......@@ -95,7 +107,21 @@ function cm.initial_effect(c)
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if tg and #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end
if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end
_SpecialSummonRule(tp,tc,sumtype)
end
......
......@@ -14,6 +14,52 @@ function cm.initial_effect(c)
e4:SetTarget(cm.target3)
e4:SetOperation(cm.activate3)
c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
local _MoveToField=Duel.MoveToField
local _ReturnToField=Duel.ReturnToField
local _IsCanOverlay=Card.IsCanOverlay
local _Overlay=Duel.Overlay
local _Equip=Duel.Equip
function Duel.MoveToField(c,tp,...)
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return false
end
return _MoveToField(c,tp,...)
end
function Duel.ReturnToField(c,...)
local tp=c:GetPreviousControler()
if c:IsHasEffect(m) then
return false
end
return _ReturnToField(c,...)
end
function Card.IsCanOverlay(c,...)
local tp=c:GetPreviousControler()
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return false
end
return _IsCanOverlay(c,...)
end
function Duel.Overlay(xc,v,...)
local t=Auxiliary.GetValueType(v)
local g=Group.CreateGroup()
if t=="Card" then g:AddCard(v) else g=v end
for c in aux.Next(g) do
local tp=c:GetPreviousControler()
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
g:RemoveCard(c)
end
end
return _Overlay(xc,g,...)
end
function Duel.Equip(tp,c,mc,...)
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return false
end
return _Equip(tp,c,mc,...)
end
end
end
function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -91,12 +137,24 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e1=e2:Clone()
e1:SetCode(EFFECT_CANNOT_SUMMON)
tc:RegisterEffect(e1,true)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_SUMMON)
tc:RegisterEffect(e4,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
tc:RegisterEffect(e3,true)
local e6=e2:Clone()
e6:SetCode(m)
tc:RegisterEffect(e6,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(1,1)
e1:SetValue(function(e,te,tp) return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE) end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3272,8 +3272,8 @@ function cm.WhitkinsToGrave(g,reason)
if gct>1 then
while true do
if #mg==0 then break end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53767028,15))
local sc=mg:SelectUnselect(sg,tp,false,#sg>0,#mg,gct)
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(53767028,15))
local sc=mg:SelectUnselect(sg,p,true,#sg>0,#mg,gct)
if not sc then break elseif mg:IsContains(sc) then
mg:RemoveCard(sc)
sg:AddCard(sc)
......
......@@ -44,9 +44,9 @@ function s.tffilter(c,tp)
return c:GetType()&0x20002==0x20002 and c:GetActivateEffect():IsActivatable(tp)
end
function s.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.acop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -128,7 +128,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local i=1
for i=1,ev do
local te,p=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if te and p~=tp and Duel.IsChainDisablable(i) then t[i]=i end
if te and p~=tp and Duel.IsChainDisablable(i) then t[#t+1]=i end
end
if #t>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
......
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