Commit 292b5421 authored by Nemo Ma's avatar Nemo Ma

fix

parent 43e56370
......@@ -34,11 +34,9 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
end
end
Duel.RegisterFlagEffect(1-rp,m,rsreset.pend,0,1,flag)
end
end
for i=0,1 do
if Duel.GetFlagEffect(i,m)>=2 then
Duel.RaiseEvent(eg,m,re,r,rp,ep,ev)
if Duel.GetFlagEffect(1-rp,m)>=2 then
Duel.RaiseEvent(eg,m,re,r,rp,1-rp,ev)
end
end
end
end
......@@ -58,7 +56,7 @@ function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
return ep==tp
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m+100)==0 end
......
......@@ -187,7 +187,7 @@ local c=e:GetHandler()
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.immval)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_CHAIN)
c:RegisterEffect(e1)
tc:RegisterEffect(e1)
end
function cm.immval(e,te)
return te:GetOwner()~=e:GetOwner()
......
......@@ -69,15 +69,18 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetLabelObject(tc)
e5:SetOperation(cm.ckop)
e5:SetOperation(cm.ckop)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e6:SetRange(LOCATION_MZONE)
e6:SetLabelObject(tc)
e6:SetOperation(cm.ckop)
e6:SetOperation(cm.ckop)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e6,true)
tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
......@@ -96,10 +99,14 @@ end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return false
else
return true
if tc:GetFlagEffect(m+1)==0 then
e:Reset()
return false
end
if tc:GetFlagEffect(m)~=0 then
return false
else
return true
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -60,7 +60,7 @@ function c46250002.trfilter(c)
end
function c46250002.tspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local n=math.floor(Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)/3)
if chk==0 then return n>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=n and Duel.IsExistingMatchingCard(c46250002.trfilter,tp,LOCATION_DECK,0,n,nil) end
if chk==0 then return n>0 and (n<2 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=n and Duel.IsExistingMatchingCard(c46250002.trfilter,tp,LOCATION_DECK,0,n,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c46250002.trfilter,tp,LOCATION_DECK,0,n,n,nil)
Duel.SendtoGrave(g,REASON_COST)
......
......@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+10000)
e2:SetCost(cm.drcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
......
......@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToDeckOrExtraAsCost()
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
......
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