Commit 4269e771 authored by 未闻皂名's avatar 未闻皂名

2024/8/30 新增:传说系列,传说卡相关修改

parent e9af7eb7
Pipeline #29443 passed with stages
in 7 minutes and 14 seconds
No preview for this file type
...@@ -203,7 +203,7 @@ function RushDuel.ChangeCode(e, card, code, reset, forced) ...@@ -203,7 +203,7 @@ function RushDuel.ChangeCode(e, card, code, reset, forced)
end end
-- 赋予: 复制卡名 -- 赋予: 复制卡名
function RushDuel.CopyCode(e, card, target, reset, forced) function RushDuel.CopyCode(e, card, target, reset, forced)
local code = target:GetLinkCode() local code = RushDuel.GetCardCode(target)
-- 使用 LinkCode 来判断传说卡 -- 使用 LinkCode 来判断传说卡
RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_LINK_CODE, code, reset, forced) RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_LINK_CODE, code, reset, forced)
RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_FUSION_CODE, code, reset, forced) RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_FUSION_CODE, code, reset, forced)
......
...@@ -155,20 +155,6 @@ function RushDuel.AddCodeList(card, ...) ...@@ -155,20 +155,6 @@ function RushDuel.AddCodeList(card, ...)
end end
end end
end end
-- 添加永续效果列表
function RushDuel.AddContinuousEffect(c, ...)
if c:IsStatus(STATUS_COPYING_EFFECT) then
return
end
if c.continuous_effect == nil then
local mt = getmetatable(c)
mt.continuous_effect = {...}
else
for _, e in ipairs {...} do
table.insert(c.continuous_effect, e)
end
end
end
-- 获取附加的效果 -- 获取附加的效果
function RushDuel.GetAttachEffects(card, code) function RushDuel.GetAttachEffects(card, code)
......
-- Rush Duel 永续效果 -- Rush Duel 永续效果
RushDuel = RushDuel or {} RushDuel = RushDuel or {}
-- 添加永续效果列表
function RushDuel.AddContinuousEffect(c, ...)
if c:IsStatus(STATUS_COPYING_EFFECT) then
return
end
if c.continuous_effect == nil then
local mt = getmetatable(c)
mt.continuous_effect = {...}
else
for _, e in ipairs {...} do
table.insert(c.continuous_effect, e)
end
end
end
-- 永续效果: 攻击宣言时, 对方不能把陷阱卡发动 -- 永续效果: 攻击宣言时, 对方不能把陷阱卡发动
function RushDuel.ContinuousAttackNotChainTrap(card) function RushDuel.ContinuousAttackNotChainTrap(card)
local e1 = Effect.CreateEffect(card) local e1 = Effect.CreateEffect(card)
......
...@@ -6,18 +6,18 @@ LEGEND_SPELL = 120000001 ...@@ -6,18 +6,18 @@ LEGEND_SPELL = 120000001
LEGEND_TRAP = 120000002 LEGEND_TRAP = 120000002
RushDuel.LegendCodes = { RushDuel.LegendCodes = {
-- 青眼白龙 -- 青眼白龙
{120120000, 120198001, 120231001}, {120120000, 120198001, 120231001},
-- 真红眼黑龙 -- 真红眼黑龙
{120125001, 120203016, 120229101}, {120125001, 120203016, 120229101},
-- 黑魔术师 -- 黑魔术师
{120130000, 120203015, 120254001}, {120130000, 120203015, 120254001},
-- 死者苏生 -- 死者苏生
{120194004, 120195004}, {120194004, 120195004},
-- 天使的施舍 -- 天使的施舍
{120196049, 120195005}, {120196049, 120195005},
-- 海龙-泰达路斯 -- 海龙-泰达路斯
{120199000, 120239060} {120199000, 120239060}
} }
-- 初始化传说卡 -- 初始化传说卡
...@@ -34,8 +34,14 @@ function RushDuel.InitLegendCard(c) ...@@ -34,8 +34,14 @@ function RushDuel.InitLegendCard(c)
e1:SetRange(0xff) e1:SetRange(0xff)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1, true) c:RegisterEffect(e1, true)
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)
-- 修改卡牌数据 (删除同名卡:传说卡) -- 修改卡牌数据 (删除同名卡:传说卡)
c:SetEntityCode(code, true) -- c:SetEntityCode(code, true)
end end
-- 获取传说卡原卡名 -- 获取传说卡原卡名
...@@ -59,14 +65,29 @@ function RushDuel.IsLegendCard(card, original) ...@@ -59,14 +65,29 @@ function RushDuel.IsLegendCard(card, original)
end end
end end
-- 获取卡名
function RushDuel.GetCardCode(card)
local code1, code2 = card:GetLinkCode()
if code2 then
return code2
else
return code1
end
end
-- 条件: 是否为传说卡的卡名
function RushDuel.IsLegendCode(card, ...)
return card:IsLinkCode(table.unpack({...}))
end
-- 条件: 是否为同名卡 -- 条件: 是否为同名卡
function RushDuel.IsSameCode(card1, card2) function RushDuel.IsSameCode(card1, card2)
return card1:IsLinkCode(card2:GetLinkCode()) return card1:IsLinkCode(RushDuel.GetCardCode(card2))
end end
-- 条件: 是否为原本卡名相同的卡 -- 条件: 是否为原本卡名相同的卡
function RushDuel.IsSameOriginalCode(card1, card2) function RushDuel.IsSameOriginalCode(card1, card2)
if RushDuel.IsLegendCard(card1) and RushDuel.IsLegendCard(card2) then if RushDuel.IsLegendCard(card1, true) and RushDuel.IsLegendCard(card2, true) then
local code1 = RushDuel.GetLegendCode(card1:GetOriginalCode()) local code1 = RushDuel.GetLegendCode(card1:GetOriginalCode())
local code2 = RushDuel.GetLegendCode(card2:GetOriginalCode()) local code2 = RushDuel.GetLegendCode(card2:GetOriginalCode())
return code1 == code2 return code1 == code2
......
...@@ -28,7 +28,7 @@ function cm.spfilter(c,e,tp) ...@@ -28,7 +28,7 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_HYDRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_HYDRAGON) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.thfilter(c) function cm.thfilter(c)
return (c:IsCode(list[1]) or c:IsLinkCode(list[2])) and c:IsAbleToHand() return (c:IsCode(list[1]) or RD.IsLegendCode(c,list[2])) and c:IsAbleToHand()
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 Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)~=0 return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)~=0
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostSendSelfToGrave() cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
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 Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
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 Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Draw --Draw
function cm.setfilter(c) function cm.setfilter(c)
return c:IsLinkCode(list[1]) and c:IsSSetable() return RD.IsLegendCode(c,list[1]) and c:IsSSetable()
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 Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0
......
...@@ -20,7 +20,7 @@ function cm.spfilter(c,e,tp) ...@@ -20,7 +20,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevelBelow(6) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelBelow(6) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
cm.cost=RD.CostSendSelfToGrave() cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.thfilter(c) function cm.thfilter(c)
return c:IsLinkCode(list[1]) and c:IsAbleToHand() return RD.IsLegendCode(c,list[1]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and (c:IsLinkCode(list[1]) return c:IsFaceup() and (RD.IsLegendCode(c,list[1])
or (c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsRace(RACE_FIEND))) or (c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsRace(RACE_FIEND)))
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return (c:IsLinkCode(list[1]) or c:GetPreviousCodeOnField()==list[1] or ( return (RD.IsLegendCode(c,list[1]) or c:GetPreviousCodeOnField()==list[1] or (
RD.IsPreviousType(c,TYPE_NORMAL) and c:GetPreviousLevelOnField()>=7 and RD.IsPreviousRace(c,RACE_FIEND) RD.IsPreviousType(c,TYPE_NORMAL) and c:GetPreviousLevelOnField()>=7 and RD.IsPreviousRace(c,RACE_FIEND)
)) and RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget() )) and RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget()
end end
......
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter1(c) function cm.confilter1(c)
return c:IsFaceup() and (c:IsLinkCode(list[1]) return c:IsFaceup() and (RD.IsLegendCode(c,list[1])
or (c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsRace(RACE_FIEND))) or (c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsRace(RACE_FIEND)))
end end
function cm.confilter2(c,tp) function cm.confilter2(c,tp)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Atk Up --Atk Up
function cm.filter(c) function cm.filter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.atkval(e,c) function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500
......
...@@ -19,7 +19,7 @@ function cm.confilter(c) ...@@ -19,7 +19,7 @@ function cm.confilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
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 Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,2,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,2,nil)
......
...@@ -21,7 +21,7 @@ function cm.costfilter(c) ...@@ -21,7 +21,7 @@ function cm.costfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeckOrExtraAsCost() return c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeckOrExtraAsCost()
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[3]) return RD.IsLegendCode(c,list[3])
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......
...@@ -18,7 +18,7 @@ function cm.filter(c) ...@@ -18,7 +18,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsLevelAbove(6) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and (c:IsLinkCode(list[1]) or c:IsCode(list[2])) return c:IsFaceup() and (RD.IsLegendCode(c,list[1]) or c:IsCode(list[2]))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
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 Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
...@@ -35,5 +35,5 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,5 +35,5 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
function cm.atktg(e,c) function cm.atktg(e,c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function cm.filter(c) ...@@ -20,7 +20,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8)
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsLinkCode(list[1]) and c:IsAbleToDeck() return RD.IsLegendCode(c,list[1]) and c:IsAbleToDeck()
end end
cm.cost=RD.CostSendSelfToGrave() cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostSendSelfToGrave() cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -22,7 +22,7 @@ function cm.filter(c) ...@@ -22,7 +22,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() return c:IsType(TYPE_SPELL) and c:IsAbleToDeck()
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsFaceup() and (c:IsLinkCode(list[1]) or c:IsRace(RACE_THUNDER)) return c:IsFaceup() and (RD.IsLegendCode(c,list[1]) or c:IsRace(RACE_THUNDER))
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
end end
function cm.desfilter(c,atk) function cm.desfilter(c,atk)
......
...@@ -19,7 +19,7 @@ function cm.costfilter(c) ...@@ -19,7 +19,7 @@ function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
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 Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
......
...@@ -20,7 +20,7 @@ function cm.costfilter(c) ...@@ -20,7 +20,7 @@ function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsCode(list[1]) or c:IsLinkCode(list[2]) return c:IsCode(list[1]) or RD.IsLegendCode(c,list[2])
end end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,5,5) cm.cost=RD.CostSendGraveToDeck(cm.costfilter,5,5)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -19,7 +19,7 @@ end ...@@ -19,7 +19,7 @@ end
--Atk Up --Atk Up
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.thfilter(c) function cm.thfilter(c)
return c:IsLinkCode(list[3]) and c:IsAbleToHand() return RD.IsLegendCode(c,list[3]) and c:IsAbleToHand()
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ function cm.spfilter(c,e,tp) ...@@ -18,7 +18,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.upfilter(c) function cm.upfilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Atk Up --Atk Up
function cm.filter(c) function cm.filter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.atkval(e,c) function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500
......
...@@ -21,7 +21,7 @@ function cm.thfilter(c) ...@@ -21,7 +21,7 @@ function cm.thfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_GALAXY) and c:IsAbleToHand() return c:IsLevelBelow(4) and c:IsRace(RACE_GALAXY) and c:IsAbleToHand()
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[3]) return RD.IsLegendCode(c,list[3])
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevel(8) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevel(8) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--To Hand --To Hand
function cm.thfilter(c) function cm.thfilter(c)
return (c:IsLinkCode(list[1]) or c:IsCode(list[2])) and c:IsAbleToHand() return (RD.IsLegendCode(c,list[1]) or c:IsCode(list[2])) and c:IsAbleToHand()
end end
cm.cost=RD.CostPayLP(700) cm.cost=RD.CostPayLP(700)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -18,7 +18,7 @@ function cm.initial_effect(c) ...@@ -18,7 +18,7 @@ function cm.initial_effect(c)
end end
--Atk Down --Atk Down
function cm.filter(c) function cm.filter(c)
return c:IsLinkCode(list[1],list[2]) return RD.IsLegendCode(c,list[1],list[2])
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 Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil)
......
...@@ -20,7 +20,7 @@ function cm.costfilter(c,e,tp) ...@@ -20,7 +20,7 @@ function cm.costfilter(c,e,tp)
return c:IsAbleToDeckOrExtraAsCost() and Duel.GetMZoneCount(tp,c)>0 return c:IsAbleToDeckOrExtraAsCost() and Duel.GetMZoneCount(tp,c)>0
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostSendMZoneToDeckBottom(cm.costfilter,1,1,true) cm.cost=RD.CostSendMZoneToDeckBottom(cm.costfilter,1,1,true)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Discard Deck --Discard Deck
function cm.thfilter(c) function cm.thfilter(c)
return c:IsLinkCode(list[1]) and c:IsAbleToHand() return RD.IsLegendCode(c,list[1]) and c:IsAbleToHand()
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 RD.IsSummonTurn(e:GetHandler()) return RD.IsSummonTurn(e:GetHandler())
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Set --Set
function cm.confilter(c) function cm.confilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.setfilter(c) function cm.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsType(TYPE_TRAP) and c:IsSSetable()
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Destroy --Destroy
function cm.confilter(c) function cm.confilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
end end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost()
......
...@@ -16,10 +16,10 @@ function cm.initial_effect(c) ...@@ -16,10 +16,10 @@ function cm.initial_effect(c)
end end
--Set --Set
function cm.setfilter(c) function cm.setfilter(c)
return (c:IsLinkCode(list[1]) or c:IsCode(list[2])) and c:IsSSetable() return (RD.IsLegendCode(c,list[1]) or c:IsCode(list[2])) and c:IsSSetable()
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.posfilter(c) function cm.posfilter(c)
return RD.IsCanChangePosition(c) return RD.IsCanChangePosition(c)
......
...@@ -21,7 +21,7 @@ function cm.costfilter(c) ...@@ -21,7 +21,7 @@ function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendHandToGrave(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)
......
...@@ -21,7 +21,7 @@ function cm.costfilter(c) ...@@ -21,7 +21,7 @@ function cm.costfilter(c)
and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost() and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end end
function cm.thfilter(c) function cm.thfilter(c)
return (c:IsCode(list[1]) or c:IsLinkCode(list[2])) and c:IsAbleToHand() return (c:IsCode(list[1]) or RD.IsLegendCode(c,list[2])) and c:IsAbleToHand()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[3]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsCode(list[3]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Discard Deck --Discard Deck
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
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 RD.IsSummonTurn(e:GetHandler()) return RD.IsSummonTurn(e:GetHandler())
......
...@@ -25,7 +25,7 @@ function cm.spfilter(c,e,tp) ...@@ -25,7 +25,7 @@ function cm.spfilter(c,e,tp)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
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,tp,rp) return eg:IsExists(cm.confilter,1,nil,tp,rp)
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsLinkCode(list[1]) return c:IsFaceup() and RD.IsLegendCode(c,list[1])
end end
function cm.filter(c) function cm.filter(c)
return c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() return c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostSendSelfToGrave() cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -26,7 +26,7 @@ function cm.spcon(e,c) ...@@ -26,7 +26,7 @@ function cm.spcon(e,c)
end end
--Special Summon --Special Summon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return RD.IsLegendCode(c,list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFacedown() and c:GetSequence()<5 return c:IsFacedown() and c:GetSequence()<5
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Atk Up --Atk Up
function cm.filter(c) function cm.filter(c)
return c:IsLinkCode(list[1]) return RD.IsLegendCode(c,list[1])
end end
function cm.atkval(e,c) function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500
......
...@@ -43,6 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 then if RD.ChangePosition(tc,pos)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg) RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp) RD.SendToHandAndExists(sg,1-tp)
end) end)
end end
......
...@@ -21,7 +21,7 @@ function cm.initial_effect(c) ...@@ -21,7 +21,7 @@ function cm.initial_effect(c)
end end
-- Decrease Tribute -- Decrease Tribute
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and (c:IsLinkCode(list[1]) or c:IsCode(list[2],list[3])) return c:IsFaceup() and (RD.IsLegendCode(c,list[1]) or c:IsCode(list[2],list[3]))
end end
function cm.sumcon(e) function cm.sumcon(e)
return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Change Code --Change Code
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsLinkCode(list[2]) and c:IsAbleToDeck() return RD.IsLegendCode(c,list[2]) and c:IsAbleToDeck()
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 Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9 and not e:GetHandler():IsCode(list[1]) return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9 and not e:GetHandler():IsCode(list[1])
......
local m=120271041
local list={120238010}
local cm=_G["c"..m]
cm.name="大传说的剑士"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
return (c:IsCode(list[1]) or RD.IsLegendCard(c)) and not c:IsPublic()
end
function cm.thfilter(c)
return RD.IsLegendCard(c) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachExtraAttackMonster(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local m=120271042
local list={120238005}
local cm=_G["c"..m]
cm.name="大传说的魔术师"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
return (c:IsCode(list[1]) or RD.IsLegendCard(c)) and not c:IsPublic()
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
local m=120271043
local list={120271044}
local cm=_G["c"..m]
cm.name="大传说的祭司"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(10)
end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
end
\ No newline at end of file
local m=120271044
local cm=_G["c"..m]
cm.name="传说的祭司"
function cm.initial_effect(c)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Discard Deck
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,3)
and Duel.IsExistingMatchingCard(RD.IsLegendCard,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-600,-600,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local m=120271047
local cm=_G["c"..m]
cm.name="传说的侦察者"
function cm.initial_effect(c)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.costfilter(c)
return RD.IsLegendCard(c) and not c:IsPublic()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToGraveAndExists(g)
end)
end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
function cm.trival(e, c)
if e==nil then return true,1 end
return RD.IsLegendCard(c)
end
\ No newline at end of file
local m=120271052
local cm=_G["c"..m]
cm.name="传承的一闪"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return RD.IsLegendCard(c) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return RD.IsLegendCard(c) and c:IsRace(RACE_WARRIOR)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanDraw(aux.Stringid(m,1),tp,1,true)
end
end)
end
\ No newline at end of file
local m=120271053
local cm=_G["c"..m]
cm.name="传说的徽章"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and RD.IsDefense(c,300)
end
function cm.thfilter(c)
return RD.IsLegendCard(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,2,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
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