Commit ed8b9250 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 25a6c99f
......@@ -41,19 +41,24 @@ end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP()
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
if chk==0 then return (tc:IsControler(tp) and tc:IsAttack(1550) and tc:IsDefense(1050)) or (at and at:IsControler(tp) and at:IsAttack(1550) and at:IsDefense(1050)) end
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(cm.reccon)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
if chk==0 then return ep==tp and (tc:IsControler(tp) and tc:IsAttack(1550) and tc:IsDefense(1050)) or (at and at:IsControler(tp) and at:IsAttack(1550) and at:IsDefense(1050)) end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
......
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