Commit 545419fa authored by 未闻皂名's avatar 未闻皂名

2023/1/29 修改传说卡判定方式

parent f9cae4d8
Pipeline #19820 passed with stages
in 4 minutes and 57 seconds
......@@ -13,6 +13,7 @@ RACE_ALL = 0x7fffffff
-- 特殊调整
EFFECT_CANNOT_DOUBLE_TRIBUTE = 120120029 -- 魔将 雅灭鲁拉(不能使用:双重解放)
EFFECT_LEGEND_CARD = 120000000 -- 传说卡标识(改变卡名不影响)
-- 创建效果: 玩家对象的全局效果
function RushDuel.CreatePlayerTargetGlobalEffect(code, value)
......
......@@ -25,6 +25,11 @@ function RushDuel.IsLegend(card)
return card:IsCode(LEGEND_MONSTER, LEGEND_SPELL, LEGEND_TRAP)
end
-- 条件: 是否为传说卡
function RushDuel.IsLegendCard(card)
return card:IsHasEffect(EFFECT_LEGEND_CARD)
end
-- 条件: 是否为传说卡的卡名
function RushDuel.IsLegendCode(card, ...)
for _, item in ipairs {...} do
......@@ -41,7 +46,7 @@ end
-- 获取卡牌的密码
function RushDuel.GetCardCode(card)
local code = card:GetCode()
if RushDuel.IsLegend(card) then
if RushDuel.IsLegendCard(card) then
code = card:GetOriginalCode()
end
local codes = RushDuel.GetEffectValues(card, EFFECT_CHANGE_CODE)
......
......@@ -73,7 +73,7 @@ end
function RushDuel.InitLegend(c)
local e = Effect.GlobalEffect()
e:SetType(EFFECT_TYPE_SINGLE)
e:SetCode(EFFECT_ADD_CODE)
e:SetCode(EFFECT_LEGEND_CARD)
e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e:SetValue(c:GetOriginalCode())
c:RegisterEffect(e, true)
......
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end
--Special Summon
function cm.spfilter(c,e,tp)
return RD.IsLegend(c) and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
return RD.IsLegendCard(c) and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp)>0 and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
......
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