Commit e52cdef9 authored by 水橋パルスィ's avatar 水橋パルスィ Committed by GitHub

fix for Kaiser Colosseum vs Nibiru & Kurikara (#2097)

parent e089f9b9
...@@ -33,6 +33,13 @@ function c27204311.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,6 +33,13 @@ function c27204311.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c27204311.spcon(e,tp,eg,ep,ev,re,r,rp) function c27204311.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_KAISER_COLOSSEUM) then
local t1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local t2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local c1=Duel.GetMatchingGroupCount(c27204311.relfilter,tp,LOCATION_MZONE,0,nil)
local c2=Duel.GetMatchingGroupCount(c27204311.relfilter,tp,0,LOCATION_MZONE,nil)
if t1-c1 >= t2-c2 then return false end
end
return Duel.GetFlagEffect(1-tp,27204311)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return Duel.GetFlagEffect(1-tp,27204311)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c27204311.relfilter(c) function c27204311.relfilter(c)
......
...@@ -23,6 +23,14 @@ function c35059553.initial_effect(c) ...@@ -23,6 +23,14 @@ function c35059553.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(c35059553.sumlimit) e3:SetValue(c35059553.sumlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--kaiser colosseum
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_KAISER_COLOSSEUM)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
c:RegisterEffect(e4)
end end
function c35059553.value(e,fp,rp,r) function c35059553.value(e,fp,rp,r)
if rp==e:GetHandlerPlayer() or r~=LOCATION_REASON_TOFIELD then return 7 end if rp==e:GetHandlerPlayer() or r~=LOCATION_REASON_TOFIELD then return 7 end
......
...@@ -54,6 +54,13 @@ function s.sprcon(e,c) ...@@ -54,6 +54,13 @@ function s.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp) local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_KAISER_COLOSSEUM) then
local t1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local t2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local r1=Duel.GetMatchingGroupCount(s.rfilter,tp,LOCATION_MZONE,0,nil,1-tp)
local r2=Duel.GetMatchingGroupCount(s.rfilter,tp,0,LOCATION_MZONE,nil,1-tp)
if t1-r1+1 > t2-r2 then return false end
end
return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil)==rg:GetCount() and aux.mzctcheck(rg,tp) return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil)==rg:GetCount() and aux.mzctcheck(rg,tp)
end end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c) function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -582,6 +582,7 @@ EFFECT_CHANGE_GRAVE_RACE =366 --墓地的卡将会改变种族(升级转变 ...@@ -582,6 +582,7 @@ EFFECT_CHANGE_GRAVE_RACE =366 --墓地的卡将会改变种族(升级转变
EFFECT_ACTIVATION_COUNT_LIMIT =367 --reserve EFFECT_ACTIVATION_COUNT_LIMIT =367 --reserve
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召唤 EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召唤
EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫) EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_KAISER_COLOSSEUM =370 --皇帝斗技场
EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果 EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) --下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
......
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