
Toothless, the Dragon Plush
Made it into a card.
Sorry for the semi-reupload.
Here's the code for it:
function c123456791.initial_effect©
--direct attack
local e1=Effect.CreateEffect©
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect©
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c123456791.rdcon)
e2:SetOperation(c123456791.rdop)
c:RegisterEffect(e2)
end
function c123456791.repcon(e)
local c=e:GetHandler()
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY)
end
function c123456791.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect©
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
Duel.RaiseEvent(c,47408488,e,0,tp,0,0)
end
function c123456791.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c123456791.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
Sorry for the semi-reupload.
Here's the code for it:
function c123456791.initial_effect©
--direct attack
local e1=Effect.CreateEffect©
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect©
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c123456791.rdcon)
e2:SetOperation(c123456791.rdop)
c:RegisterEffect(e2)
end
function c123456791.repcon(e)
local c=e:GetHandler()
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY)
end
function c123456791.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect©
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
Duel.RaiseEvent(c,47408488,e,0,tp,0,0)
end
function c123456791.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c==Duel.GetAttacker() and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c123456791.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
Category All / Baby fur
Species Unspecified / Any
Size 400 x 580px
File Size 29.1 kB
Comments