Exceed Dragon pen effect

This commit is contained in:
2022-01-15 11:05:20 +01:00
parent c591547e15
commit 909cfc719a

View File

@@ -29,6 +29,13 @@ function s.initial_effect(c)
e2:SetTarget(s.pentg)
e2:SetOperation(s.penop)
c:RegisterEffect(e2)
--pendulum effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_PZONE)
e3:SetTarget(s.gytarget)
c:RegisterEffect(e3)
end
--halve and gain functions
@@ -84,3 +91,27 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--pendulum effect functions
function s.gytarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsLocation,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsLocation,tp,0,LOCATION_GRAVE,1,1,nil)
end
--[[function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(c, LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_GRAVE,1,1,nil)
local d=g:GetFirst():GetAttack()
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,d)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if tc and tc:IsRelateToEffect(e) and Duel.Damage(p,tc:GetAttack(),REASON_EFFECT) then
Duel.Destroy(tc, REASON_DESTROY)
end
end]]