Commit adba2c5e authored by POLYMER's avatar POLYMER

fix

parent 2111fddb
......@@ -78,7 +78,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.setfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x9977) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or c:IsSSetable())
return c:IsFaceup() and c:IsSetCard(0x9977) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1) or c:IsSSetable())
end
function cm.spfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
......@@ -107,7 +107,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local res=false
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not tc:IsSSetable() or Duel.SelectYesNo(tp,Stringid(m,3))) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and (not tc:IsSSetable() or Duel.SelectYesNo(tp,Stringid(m,3))) then
res=Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
res=Duel.SSet(tp,tc)>0
......
......@@ -45,7 +45,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local cg=tc:GetColumnGroup()
local dg=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ac,cg)
if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.checkfilter,tp,LOCATION_ONFIELD,0,1,nil) then
local g=Duel.GetOperatedGroup():Filter(Card.IsControler,nil,1-tp)
local g=Duel.GetOperatedGroup():Filter(Card.IsPreviousControler,nil,1-tp)
Duel.BreakEffect()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
......
......@@ -23,7 +23,6 @@ function c22022090.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22022090)
e2:SetTarget(c22022090.thtg)
e2:SetOperation(c22022090.thop)
c:RegisterEffect(e2)
......
......@@ -87,7 +87,7 @@ function c22348226.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-400)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
ttc=g:GetNext()
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
......
......@@ -156,19 +156,11 @@ if not cm.enable_all_setname then
end
end
function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)==0
return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_EXTRA,1,nil,m)
end
function cm.op(e,tp)
local c=e:GetHandler()
DuelModeChange.TwoPick1(tp)
DuelModeChange.TwoPick1(1-tp)
if Duel.GetFlagEffect(1-tp,m+10000000)==0 then
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1000)
else
DuelModeChange.TwoPick1(tp)
DuelModeChange.TwoPick1(1-tp)
end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
end
......
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