Commit 84e3e4af authored by mercury233's avatar mercury233

fix

parent a4896bde
......@@ -5,6 +5,7 @@ function c27877771.initial_effect(c)
e1:SetDescription(aux.Stringid(27877771,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,27877771)
e1:SetTarget(c27877771.target)
......
......@@ -61,6 +61,7 @@ function c37433748.eqop(e,tp,eg,ep,ev,re,r,rp)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCondition(c37433748.dircon)
e5:SetCost(c37433748.dircost)
e5:SetOperation(c37433748.dirop)
e5:SetReset(RESET_EVENT+0x1fe0000)
......@@ -69,18 +70,26 @@ end
function c37433748.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c37433748.dircon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c37433748.cfilter(c,ec)
return c:IsAbleToGraveAsCost() and c~=ec
end
function c37433748.dircost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,c) end
local ec=c:GetEquipTarget()
if chk==0 then return Duel.IsExistingMatchingCard(c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,c,ec) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,c)
local g=Duel.SelectMatchingCard(tp,c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,ec)
Duel.SendtoGrave(g,REASON_COST)
end
function c37433748.dirop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ec=e:GetHandler():GetEquipTarget()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
if not ec then return end
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
......
......@@ -9,7 +9,7 @@ function c66393507.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c66393507.spcon)
e1:SetTarget(c66393507.sptg)
e1:SetOperation(c66393507.spop)
......
......@@ -9,7 +9,7 @@ function c92781606.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c92781606.spcon)
e1:SetTarget(c92781606.sptg)
e1:SetOperation(c92781606.spop)
......
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