Commit a5c6067d authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c16364023.lua

parent 98c92350
Pipeline #30842 passed with stages
in 32 minutes and 29 seconds
......@@ -34,6 +34,15 @@ function c16364023.initial_effect(c)
e3:SetTarget(c16364023.thtg)
e3:SetOperation(c16364023.thop)
c:RegisterEffect(e3)
--attack up
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetCountLimit(1)
e4:SetCondition(c16364023.atkcon)
e4:SetOperation(c16364023.atkop)
c:RegisterEffect(e4)
end
function c16364023.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xdc3) and c:IsType(TYPE_XYZ)
......@@ -94,4 +103,24 @@ function c16364023.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16364023.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
return a:IsControler(tp) and a~=c and a:GetAttack()<d:GetAttack() and c:GetAttack()>0
end
function c16364023.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if ac:IsFaceup() and ac:IsRelateToBattle() and c:IsRelateToEffect(e) and c:IsFaceup() then
local atk=c:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(atk)
ac:RegisterEffect(e1)
end
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