Commit 3cf63cfd authored by salix5's avatar salix5

fix: target effect

parent 95419d59
...@@ -33,6 +33,7 @@ function c30989084.initial_effect(c) ...@@ -33,6 +33,7 @@ function c30989084.initial_effect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_RECOVER+CATEGORY_REMOVE) e3:SetCategory(CATEGORY_RECOVER+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2) e3:SetCountLimit(1,id+o*2)
e3:SetCost(s.rmcost) e3:SetCost(s.rmcost)
......
...@@ -34,8 +34,7 @@ function s.initial_effect(c) ...@@ -34,8 +34,7 @@ function s.initial_effect(c)
e3:SetOperation(s.damop) e3:SetOperation(s.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--recover
--recover
function s.recfilter(c,lg) function s.recfilter(c,lg)
return lg:IsContains(c) return lg:IsContains(c)
end end
...@@ -56,17 +55,15 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,17 +55,15 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) Duel.Recover(p,d,REASON_EFFECT)
end end
--damage
--damage
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp or 1-tp return ep==tp or 1-tp
end end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp and 1-tp) Duel.SetTargetPlayer(tp and 1-tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp and 1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000)
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1000,REASON_EFFECT,true) Duel.Damage(1-tp,1000,REASON_EFFECT,true)
......
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