Commit 041e6cc8 authored by DailyShana's avatar DailyShana

fix

parent 1a395486
...@@ -36,6 +36,19 @@ function c35199656.initial_effect(c) ...@@ -36,6 +36,19 @@ function c35199656.initial_effect(c)
e4:SetCondition(c35199656.damcon2) e4:SetCondition(c35199656.damcon2)
e4:SetOperation(c35199656.damop2) e4:SetOperation(c35199656.damop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not c35199656.global_check then
c35199656.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetOperation(c35199656.count)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetOperation(c35199656.reset)
Duel.RegisterEffect(ge2,0)
end
end end
function c35199656.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c35199656.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -66,10 +79,14 @@ function c35199656.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,10 +79,14 @@ function c35199656.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c35199656.count(e,tp,eg,ep,ev,re,r,rp)
c35199656.chain_solving=true
end
function c35199656.reset(e,tp,eg,ep,ev,re,r,rp)
c35199656.chain_solving=false
end
function c35199656.damcon1(e,tp,eg,ep,ev,re,r,rp) function c35199656.damcon1(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsControler,nil,1-tp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and not c35199656.chain_solving
return #g>0
and (not re or not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS) or g:IsExists(Card.IsReason,1,nil,REASON_COST))
end end
function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp) function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,35199656) Duel.Hint(HINT_CARD,0,35199656)
...@@ -77,9 +94,7 @@ function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,9 +94,7 @@ function c35199656.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ct*200,REASON_EFFECT) Duel.Damage(1-tp,ct*200,REASON_EFFECT)
end end
function c35199656.regcon(e,tp,eg,ep,ev,re,r,rp) function c35199656.regcon(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsControler,nil,1-tp) return eg:IsExists(Card.IsControler,1,nil,1-tp) and c35199656.chain_solving
return #g>0
and re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and not g:IsExists(Card.IsReason,1,nil,REASON_COST)
end end
function c35199656.regop(e,tp,eg,ep,ev,re,r,rp) function c35199656.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(Card.IsControler,nil,1-tp) local ct=eg:FilterCount(Card.IsControler,nil,1-tp)
......
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