Commit 66f1c755 authored by salix5's avatar salix5

update aux.GetCappedLevel()

from aux.GetCappedValue()
parent 4bb6b8d6
......@@ -29,7 +29,7 @@ function c29253591.synlimit(e,c)
return not c:IsSetCard(0x29)
end
function c29253591.slevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
return (4<<16)+lv
end
function c29253591.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -18,7 +18,7 @@ function c29888389.initial_effect(c)
c:RegisterEffect(e2)
end
function c29888389.rlevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsAttribute(ATTRIBUTE_WATER) then
local clv=c:GetLevel()
return (lv<<16)+clv
......
......@@ -8,7 +8,7 @@ function c34334692.initial_effect(c)
c:RegisterEffect(e1)
end
function c34334692.rlevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsAttribute(ATTRIBUTE_DARK) then
local clv=c:GetLevel()
return (lv<<16)+clv
......
......@@ -18,7 +18,7 @@ function c4632019.initial_effect(c)
c:RegisterEffect(e2)
end
function c4632019.synclv(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
return (8<<16)+lv
end
function c4632019.efcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,7 +18,7 @@ function c47106439.initial_effect(c)
c:RegisterEffect(e2)
end
function c47106439.rlevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsAttribute(ATTRIBUTE_WATER) then
local clv=c:GetLevel()
return (lv<<16)+clv
......
......@@ -20,7 +20,7 @@ function c90307777.initial_effect(c)
c:RegisterEffect(e2)
end
function c90307777.rlevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xb4) then
local clv=c:GetLevel()
return (lv<<16)+clv
......
......@@ -21,7 +21,7 @@ function c92676637.initial_effect(c)
c:RegisterEffect(e2)
end
function c92676637.slevel(e,c)
local lv=aux.GetCappedValue(e:GetHandler(),Card.GetLevel)
local lv=aux.GetCappedLevel(e:GetHandler())
return (2<<16)+lv
end
function c92676637.drcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2814,10 +2814,11 @@ function Auxiliary.IsSpecialSummonedByEffect(e)
return not ((e:GetCode()==EFFECT_SPSUMMON_PROC or e:GetCode()==EFFECT_SPSUMMON_PROC_G) and e:GetProperty()&(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)==(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE))
end
--
function Auxiliary.GetCappedValue(c,f)
if f(c)>MAX_PARAMETER then
function Auxiliary.GetCappedLevel(c)
local lv=c:GetLevel()
if lv>MAX_PARAMETER then
return MAX_PARAMETER
else
return f(c)
return lv
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