Commit b64660f2 authored by 未闻皂名's avatar 未闻皂名

2024/1/3 不能盖放怪兽调整

parent 1879dc58
Pipeline #24777 passed with stages
in 16 minutes and 58 seconds
......@@ -183,7 +183,17 @@ function RushDuel.CreateCannotSetMonsterEffect(e, desc, target, player, s_range,
end
e1:SetReset(reset)
Duel.RegisterEffect(e1, player)
return e1
local e2 = Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(s_range, o_range)
e2:SetTarget(function(e, c, sump, sumtype, sumpos, targetp)
return sumpos&POS_FACEDOWN > 0 and (not target or target(e, c))
end)
e2:SetReset(reset)
Duel.RegisterEffect(e2, player)
return e1, e2
end
-- 创建效果: 不能特殊召唤怪兽 (对玩家效果)
function RushDuel.CreateCannotSpecialSummonEffect(e, desc, target, player, s_range, o_range, reset)
......
......@@ -25,8 +25,12 @@ function cm.initial_effect(c)
e3:SetCondition(RD.MaximumMode)
e3:SetTarget(cm.setlimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetTarget(cm.splimit)
c:RegisterEffect(e4)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3)
RD.AddContinuousEffect(c,e1,e2,e3,e4)
end
--Cannot Special Summon
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
......@@ -35,4 +39,7 @@ end
--Cannot Set
function cm.setlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_HAND)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_HAND) and sumpos&POS_FACEDOWN>0
end
\ No newline at end of file
......@@ -15,18 +15,25 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
c:RegisterEffect(e2)
--Cannot Set Spell & Trap
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SSET)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(cm.setcon2)
e3:SetTarget(cm.setlimit)
local e3=e1:Clone()
e3:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e3:SetTarget(cm.splimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
c:RegisterEffect(e4)
--Cannot Set Spell & Trap
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SSET)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetCondition(cm.setcon2)
e5:SetTarget(cm.setlimit)
c:RegisterEffect(e5)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3)
RD.AddContinuousEffect(c,e1,e2,e3,e4,e5)
end
--Cannot Set Monster
function cm.confilter1(c)
......@@ -38,6 +45,9 @@ end
function cm.setlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_HAND)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_HAND) and sumpos&POS_FACEDOWN>0
end
--Cannot Set Spell & Trap
function cm.confilter2(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP)
......
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