Commit 2c8fb1df authored by Nemo Ma's avatar Nemo Ma

fix

parent e9d16732
......@@ -34,18 +34,15 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x356))
e3:SetValue(cm.efilter)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_CHAOS,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
......
......@@ -39,11 +39,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local t1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local t2=Duel.IsExistingMatchingCard(cm.rfilter,tp,0,LOCATION_GRAVE+LOCATION_EXTRA,1,nil)
local op1=false
local op=0
if t then
t=Duel.SelectYesNo(tp,aux.Stringid(m,0))
op1=Duel.SelectYesNo(tp,aux.Stringid(m,0))
end
if not t then
if not op1 then
local x={}
local y={}
local ct=1
......@@ -54,17 +55,17 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
op=y[sp+1]
end
if op==1 or t then
if op==1 or op1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
if op==2 or t then
if op==2 or op1 then
Duel.Damage(1-tp,800,REASON_EFFECT)
end
if op==3 or t then
if op==3 or op1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,0,0+LOCATION_EXTRA,1,1,nil)
if g:GetCount()>0 then
......
......@@ -21,7 +21,7 @@ function cm.cfilter(c,tp)
return c:GetPreviousControler()==tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
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