Commit 2cbf0f68 authored by POLYMER's avatar POLYMER

fix

parent 4a7b73e1
......@@ -147,10 +147,10 @@ function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)>0 then return end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
if not re:GetHandler():IsSetCard(0x6e) or not c:IsSSetable() or cm.column~=0 then return end
if Duel.SelectEffectYesNo(tp,c) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_CARD,0,m)
Duel.SSet(tp,c,tp,true)
--c:RegisterFlagEffect(m-11,RESET_CHAIN,0,1)
......
......@@ -142,14 +142,16 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
if te:GetLabel()==e:GetLabel() then res=true break end
end
if not res then e:Reset() return end
local d=Duel.TossDice(tp,1)
if d>5 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,1,nil,tp,d)
if #g>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
for i=1,1+#{Duel.IsPlayerAffectedByEffect(0,11451973)} do
local d=Duel.TossDice(tp,1)
if d>5 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,1,nil,tp,d)
if #g>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -138,22 +138,24 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
if te:GetLabel()==e:GetLabel() then res=true break end
end
if not res then e:Reset() return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 then
--Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
--e1:SetCondition(cm.recon)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
g:GetFirst():RegisterEffect(e1,true)
local eid=e1:GetFieldID()
e1:SetLabel(eid)
g:GetFirst():RegisterFlagEffect(m+0xffffff,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
for i=1,1+#{Duel.IsPlayerAffectedByEffect(0,11451973)} do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 then
--Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
--e1:SetCondition(cm.recon)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
g:GetFirst():RegisterEffect(e1,true)
local eid=e1:GetFieldID()
e1:SetLabel(eid)
g:GetFirst():RegisterFlagEffect(m+0xffffff,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end
end
end
function cm.efilter(e,te)
......
......@@ -118,7 +118,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
de:SetDescription(aux.Stringid(11451961+#eset,8))
de:SetLabel(eid)
de:SetType(EFFECT_TYPE_FIELD)
de:SetCode(0x20000000+11451961)
de:SetCode(EFFECT_FLAG_EFFECT+11451961)
de:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
de:SetTargetRange(1,0)
Duel.RegisterEffect(de,tp)
......@@ -145,13 +145,15 @@ function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) end
e:SetTarget(tg)
tg(e,tp,eg,ep,ev,re,r,rp,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1972,1)
if #g>0 then
local prop1,prop2=e:GetProperty()
te:SetProperty(prop1|EFFECT_FLAG_IGNORE_IMMUNE,prop2)
g:GetFirst():AddCounter(0x1972,1)
te:SetProperty(prop1,prop2)
for i=1,1+#{Duel.IsPlayerAffectedByEffect(0,11451973)} do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1972,1)
if #g>0 then
local prop1,prop2=e:GetProperty()
te:SetProperty(prop1|EFFECT_FLAG_IGNORE_IMMUNE,prop2)
g:GetFirst():AddCounter(0x1972,1)
te:SetProperty(prop1,prop2)
end
end
end
te:SetTarget(tg2)
......@@ -166,10 +168,12 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
if te:GetLabel()==e:GetLabel() then res=true break end
end
if not res then e:Reset() return end
Duel.Hint(HINT_SELECTMSG,rp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(rp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1972,1)
if #g>0 then
g:GetFirst():AddCounter(0x1972,1)
for i=1,1+#{Duel.IsPlayerAffectedByEffect(0,11451973)} do
Duel.Hint(HINT_SELECTMSG,rp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(rp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1972,1)
if #g>0 then
g:GetFirst():AddCounter(0x1972,1)
end
end
end
function cm.efilter(e,re)
......
......@@ -66,7 +66,7 @@ function cm.spfilter1(c,e,tp)
end
function cm.spfilter2(c,e,tp)
return c:IsCode(21123811) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return c:IsCode(71527471) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.fitn(g,e,tp)
return (g:FilterCount(Card.IsType,nil,TYPE_FUSION)>0 and g:FilterCount(Card.IsType,nil,TYPE_SYNCHRO)>0 and g:FilterCount(Card.IsType,nil,TYPE_XYZ)>0 and g:FilterCount(Card.IsType,nil,TYPE_LINK)>0 and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp)) or Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
......
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