Commit 0170f1ea authored by DailyShana's avatar DailyShana

fix #766

parent cf7a9b72
...@@ -21,7 +21,7 @@ function c78274190.initial_effect(c) ...@@ -21,7 +21,7 @@ function c78274190.initial_effect(c)
e4:SetCode(EVENT_BATTLE_DESTROYING) e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_PZONE) e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(c78274190.cacon) e4:SetTarget(c78274190.catg)
e4:SetOperation(c78274190.caop) e4:SetOperation(c78274190.caop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--draw --draw
...@@ -41,19 +41,17 @@ function c78274190.sccon(e) ...@@ -41,19 +41,17 @@ function c78274190.sccon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end end
function c78274190.cacon(e,tp,eg,ep,ev,re,r,rp) function c78274190.afilter(c,tp)
local a=Duel.GetAttacker() return c:IsControler(tp) and c:IsSetCard(0x9a) and c:IsChainAttackable()
local d=Duel.GetAttackTarget() end
if not d then return false end function c78274190.catg(e,tp,eg,ep,ev,re,r,rp,chk)
if a:IsStatus(STATUS_OPPO_BATTLE) and d:IsControler(tp) then a,d=d,a end if chk==0 then return eg:IsExists(c78274190.afilter,1,nil,tp) end
if a:IsSetCard(0x9a) and a:IsChainAttackable() then local a=eg:Filter(c78274190.afilter,nil,tp):GetFirst()
e:SetLabelObject(a) Duel.SetTargetCard(a)
return true
else return false end
end end
function c78274190.caop(e,tp,eg,ep,ev,re,r,rp) function c78274190.caop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=e:GetLabelObject() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToBattle() then if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToBattle() then
Duel.ChainAttack() Duel.ChainAttack()
end end
......
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