Commit 079e6418 authored by wyykak's avatar wyykak

fix 27038

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 127fecdc
......@@ -13,6 +13,7 @@ function c27038.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c27038.condition)
e2:SetTarget(c27038.dmtg1)
e2:SetOperation(c27038.dmop1)
......@@ -24,6 +25,21 @@ function c27038.initial_effect(c)
e3:SetTarget(c27038.dmtg4)
e3:SetOperation(c27038.dmop3)
c:RegisterEffect(e3)
local e2b=e2:Clone()
e2b:SetCategory(CATEGORY_DAMAGE)
e2b:SetCode(EVENT_BE_BATTLE_TARGET)
e2b:SetCondition(c27038.bdcon)
e2b:SetTarget(c27038.bdtg)
e2b:SetOperation(c27038.bgop)
c:RegisterEffect(e2b)
local e3b=e3b:Clone()
e3b:SetRange(LOCATION_GRAVE)
e3b:SetTarget(c27038.bdtg2)
e3b:SetOperation(c27038.bgop2)
c:RegisterEffect(e3b)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(27038,0))
e4:SetCategory(CATEGORY_DAMAGE)
......@@ -123,3 +139,23 @@ end
function c27038.dmop6(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,400,REASON_EFFECT)
end
function c27038.bdcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x242)
end
function c27038.bdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600)
end
function c27038.bdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.Damage(1-tp,1600,REASON_EFFECT)
end
end
function c27038.bdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function c27038.bdop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,800,REASON_EFFECT)
end
\ No newline at end of file
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