Commit f6ac4136 authored by mercury233's avatar mercury233

format

parent 00172c3a
......@@ -24,7 +24,7 @@ function s.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetTarget(function(e,c,tp,r) return c==e:GetHandler() and r==REASON_EFFECT end)
e3:SetTarget(s.rmlimit)
e3:SetCondition(s.matcon)
c:RegisterEffect(e3)
--buff atk/def
......@@ -53,6 +53,9 @@ function s.matcon(e)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)>0
end
function s.rmlimit(e,c,tp,r)
return c==e:GetHandler() and r==REASON_EFFECT
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
......
......@@ -31,7 +31,7 @@ function s.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetCountLimit(1,id+o)
e4:SetCondition(function(e,tp,eg,ep) return ep==1-tp end)
e4:SetCondition(s.f2dcon)
e4:SetTarget(s.f2dtg)
e4:SetOperation(s.f2dop)
c:RegisterEffect(e4)
......@@ -59,6 +59,9 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,g)
end
end
function s.f2dcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function s.f2dtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsFaceup,Card.IsAbleToDeck),tp,0,LOCATION_MZONE,1,nil) 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