Commit a72ba1a1 authored by nekrozar's avatar nekrozar Committed by DailyShana

fix Spell Absorption (#738)

* fix
* fix
parent 6cc35d91
...@@ -6,17 +6,26 @@ function c51481927.initial_effect(c) ...@@ -6,17 +6,26 @@ function c51481927.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--LP up --LP up
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAINING)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_SZONE)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(51481927,0)) e2:SetDescription(aux.Stringid(51481927,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c51481927.condition)
e2:SetOperation(c51481927.operation) e2:SetOperation(c51481927.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51481927.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0
end
function c51481927.operation(e,tp,eg,ep,ev,re,r,rp) function c51481927.operation(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT)
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) and te:GetHandler()~=e:GetHandler() then
Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT)
end
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