Commit dc14ca3a authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Rivalry of Warlords and so on (#1847)

parent 047f1b6c
......@@ -23,7 +23,7 @@ function c23931679.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(c23931679.condition)
e3:SetTargetRange(1,1)
......
......@@ -18,7 +18,7 @@ function c24207889.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(c24207889.sumlimit)
......@@ -44,7 +44,7 @@ function c24207889.initial_effect(c)
end
end
function c24207889.rmfilter(c,rc)
return c:IsFaceup() and c:IsRace(rc)
return c:IsFaceup() and c:IsRace(rc) and c:IsStatus(STATUS_EFFECT_ENABLED)
end
function c24207889.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumtype==SUMMON_TYPE_DUAL then return false end
......
......@@ -19,7 +19,7 @@ function c53334471.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(c53334471.sumlimit)
......@@ -48,9 +48,12 @@ function c53334471.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
c53334471[0]=0
c53334471[1]=0
end
function c53334471.limfilter(c)
return c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED)
end
function c53334471.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
local at=c53334471.getattribute(Duel.GetMatchingGroup(Card.IsFaceup,targetp or sump,LOCATION_MZONE,0,nil))
local at=c53334471.getattribute(Duel.GetMatchingGroup(c53334471.limfilter,targetp or sump,LOCATION_MZONE,0,nil))
if at==0 then return false end
return c:GetAttribute()~=at
end
......
......@@ -19,7 +19,7 @@ function c90846359.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(c90846359.sumlimit)
......@@ -48,9 +48,12 @@ function c90846359.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
c90846359[0]=0
c90846359[1]=0
end
function c90846359.limfilter(c)
return c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED)
end
function c90846359.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
local rc=c90846359.getrace(Duel.GetMatchingGroup(Card.IsFaceup,targetp or sump,LOCATION_MZONE,0,nil))
local rc=c90846359.getrace(Duel.GetMatchingGroup(c90846359.limfilter,targetp or sump,LOCATION_MZONE,0,nil))
if rc==0 then return false end
return c:GetRace()~=rc
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