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

2023/6/4 调整永续改变卡名的效果

parent 97e08d7d
......@@ -57,4 +57,27 @@ end
-- 条件: 是否为同名卡
function RushDuel.IsSameCode(card1, card2)
return card1:IsLinkCode(card2:GetLinkCode())
end
\ No newline at end of file
end
-- 永续改变卡名
function RushDuel.EnableChangeCode(c, code, location, condition)
Auxiliary.AddCodeList(c, code)
local loc = c:GetOriginalType() & TYPE_MONSTER ~= 0 and LOCATION_MZONE or LOCATION_SZONE
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(location or loc)
if condition ~= nil then
e1:SetCondition(condition)
end
e1:SetValue(code)
c:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_ADD_LINK_CODE)
c:RegisterEffect(e2)
local e3 = e1:Clone()
e3:SetCode(EFFECT_ADD_FUSION_CODE)
c:RegisterEffect(e3)
return e1, e2, e3
end
......@@ -4,5 +4,5 @@ local cm=_G["c"..m]
cm.name="原始电子龙"
function cm.initial_effect(c)
--Change Code
aux.EnableChangeCode(c,list[1])
RD.EnableChangeCode(c,list[1])
end
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.name="传说的战士-破坏剑士"
function cm.initial_effect(c)
--Change Code
aux.EnableChangeCode(c,list[1],LOCATION_GRAVE)
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
--Cannot Direct Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.name="鹰身三姐妹[L]"
function cm.initial_effect(c)
--Change Code
aux.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
RD.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
--Indes (Normal)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.name="鹰身三姐妹[R]"
function cm.initial_effect(c)
--Change Code
aux.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
RD.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
--Indes (Normal)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.name="鹰身女郎1"
function cm.initial_effect(c)
--Change Code
aux.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
RD.EnableChangeCode(c,list[1],LOCATION_MZONE+LOCATION_GRAVE)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_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