Commit e74a9cb3 authored by Nemo Ma's avatar Nemo Ma

fix

parent bfc645b3
...@@ -63,11 +63,11 @@ end ...@@ -63,11 +63,11 @@ end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
local tt=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_ONFIELD,0,nil) local tt=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_ONFIELD,0,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return #tt>0 and Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return #tt>0 and Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,#tt,nil) local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,#tt,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#tt,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#tt,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -42,6 +42,7 @@ function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -42,6 +42,7 @@ function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumpos,POS_FACEDOWN)>0 or not se:GetHandler():IsCode(m) return bit.band(sumpos,POS_FACEDOWN)>0 or not se:GetHandler():IsCode(m)
end end
function cm.val(e,c,sump,sumtype,sumpos,targetp,se) function cm.val(e,c,sump,sumtype,sumpos,targetp,se)
if not se then return true end
return not se:GetHandler():IsCode(m) return not se:GetHandler():IsCode(m)
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -51,7 +51,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_EP) e2:SetCode(EFFECT_CANNOT_EP)
...@@ -59,7 +59,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN) e2:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1) e3:SetCountLimit(1)
...@@ -69,7 +69,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(1-tp,aux.Stringid(m,0)) then if Duel.SelectYesNo(1-tp,aux.Stringid(m,0)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN) e1:SetCode(EFFECT_SKIP_TURN)
...@@ -77,7 +77,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCountLimit(1) e3:SetCountLimit(1)
......
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