Commit 3fa47b24 authored by 未闻皂名's avatar 未闻皂名

2023/2/12 调整更新,bug修复

parent 40f40b92
...@@ -12,8 +12,9 @@ RACE_GALAXY = 0x40000000 -- 银河 ...@@ -12,8 +12,9 @@ RACE_GALAXY = 0x40000000 -- 银河
RACE_ALL = 0x7fffffff RACE_ALL = 0x7fffffff
-- 特殊调整 -- 特殊调整
EFFECT_CANNOT_DOUBLE_TRIBUTE = 120120029 -- 魔将 雅灭鲁拉(不能使用:双重解放) EFFECT_LEGEND_CARD = 120000000 -- 传说卡标识 (改变卡名不影响)
EFFECT_LEGEND_CARD = 120000000 -- 传说卡标识(改变卡名不影响) EFFECT_CANNOT_DOUBLE_TRIBUTE = 120120029 -- 魔将 雅灭鲁拉 (不能使用:双重解放)
EFFECT_PLAYER_CANNOT_ATTACK = 120155054 -- 幻刃封锁 (对方不能攻击时不能发动)
-- 创建效果: 玩家对象的全局效果 -- 创建效果: 玩家对象的全局效果
function RushDuel.CreatePlayerTargetGlobalEffect(code, value) function RushDuel.CreatePlayerTargetGlobalEffect(code, value)
...@@ -52,7 +53,7 @@ function RushDuel.CreateHintEffect(e, desc, player, s_range, o_range, reset) ...@@ -52,7 +53,7 @@ function RushDuel.CreateHintEffect(e, desc, player, s_range, o_range, reset)
Duel.RegisterEffect(e1, player) Duel.RegisterEffect(e1, player)
return e1 return e1
end end
-- 创建效果: 不能攻击 (对玩家效果) -- 创建效果: 只能用特定类型的怪兽攻击 (对玩家效果)
function RushDuel.CreateAttackLimitEffect(e, target, player, s_range, o_range, reset) function RushDuel.CreateAttackLimitEffect(e, target, player, s_range, o_range, reset)
local e1 = Effect.CreateEffect(e:GetHandler()) local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -66,6 +67,32 @@ function RushDuel.CreateAttackLimitEffect(e, target, player, s_range, o_range, r ...@@ -66,6 +67,32 @@ function RushDuel.CreateAttackLimitEffect(e, target, player, s_range, o_range, r
Duel.RegisterEffect(e1, player) Duel.RegisterEffect(e1, player)
return e1 return e1
end end
-- 创建效果: 不能攻击 (对玩家效果)
function RushDuel.CreateCannotAttackEffect(e, hint, player, s_range, o_range, reset)
local s_target, o_traget = 0, 0
if s_range == 1 then
s_target = LOCATION_MZONE
end
if o_range == 1 then
o_traget = LOCATION_MZONE
end
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(s_target, o_traget)
e1:SetReset(reset)
Duel.RegisterEffect(e1, player)
local e2 = Effect.CreateEffect(e:GetHandler())
e2:SetDescription(hint)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PLAYER_CANNOT_ATTACK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
e2:SetTargetRange(s_range, o_range)
e2:SetReset(reset)
Duel.RegisterEffect(e2, player)
return e1, e2
end
-- 创建效果: 不能直接攻击 (对玩家效果) -- 创建效果: 不能直接攻击 (对玩家效果)
function RushDuel.CreateCannotDirectAttackEffect(e, target, player, s_range, o_range, reset) function RushDuel.CreateCannotDirectAttackEffect(e, target, player, s_range, o_range, reset)
local e1 = Effect.CreateEffect(e:GetHandler()) local e1 = Effect.CreateEffect(e:GetHandler())
...@@ -178,7 +205,7 @@ function RushDuel.CreateOnlyThisAttackEffect(e, code, player, s_range, o_range, ...@@ -178,7 +205,7 @@ function RushDuel.CreateOnlyThisAttackEffect(e, code, player, s_range, o_range,
e1:SetLabelObject(c) e1:SetLabelObject(c)
e1:SetTargetRange(s_range, o_range) e1:SetTargetRange(s_range, o_range)
e1:SetTarget(function(e, c) e1:SetTarget(function(e, c)
return c == e:GetLabelObject() and c:GetFlagEffect(code) == 0 return not (c == e:GetLabelObject() and c:GetFlagEffect(code) ~= 0)
end) end)
e1:SetReset(reset) e1:SetReset(reset)
Duel.RegisterEffect(e1, player) Duel.RegisterEffect(e1, player)
......
...@@ -31,7 +31,6 @@ end ...@@ -31,7 +31,6 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.Damage(nil,Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)*500) RD.Damage(nil,Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)*500)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateCannotAttackEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,nil,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function cm.costfilter(c) ...@@ -20,7 +20,7 @@ function cm.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsRace(RACE_WYRM) and c:IsAbleToGraveAsCost()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp) return eg:IsExists(cm.confilter,1,nil,1-tp) and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_PLAYER_CANNOT_ATTACK)
end end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -32,7 +32,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end) end)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateCannotAttackEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,nil,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
\ No newline at end of file
...@@ -31,7 +31,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end) end)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateCannotAttackEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,nil,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
\ No newline at end of file
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