Commit e69dd650 authored by mercury233's avatar mercury233

Revert "remove aux.dogcon"

This reverts commit 325e23a3.
parent f402c83d
......@@ -13,7 +13,7 @@ function c18426196.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c18426196.thcon)
e1:SetCondition(aux.dogcon)
e1:SetCost(c18426196.thcost)
e1:SetTarget(c18426196.thtg)
e1:SetOperation(c18426196.thop)
......@@ -24,10 +24,6 @@ function c18426196.condtion(e)
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler()
end
function c18426196.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c18426196.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
......
......@@ -7,15 +7,11 @@ function c68535320.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c68535320.condition)
e1:SetCondition(aux.dogcon)
e1:SetTarget(c68535320.target)
e1:SetOperation(c68535320.operation)
c:RegisterEffect(e1)
end
function c68535320.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c68535320.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -7,15 +7,11 @@ function c95929069.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c95929069.condition)
e1:SetCondition(aux.dogcon)
e1:SetTarget(c95929069.target)
e1:SetOperation(c95929069.operation)
c:RegisterEffect(e1)
end
function c95929069.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c95929069.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -1975,6 +1975,11 @@ function Auxiliary.bdogcon(e,tp,eg,ep,ev,re,r,rp)
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
--condition of EVENT_TO_GRAVE + destroyed_by_opponent_from_field
function Auxiliary.dogcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp==1-tp
end
--condition of "except the turn this card was sent to the Graveyard"
function Auxiliary.exccon(e)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
......
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