Commit 1544d94d authored by 未闻皂名's avatar 未闻皂名

2024/12/24 新增:流圣之公主,异画卡,仪式术手续以及测试卡

parent 9e83ad68
Pipeline #32048 passed with stages
in 10 minutes and 58 seconds
No preview for this file type
File added
......@@ -60,7 +60,7 @@ function RushDuel.AttachOpponentTribute(e, card, flag, desc, reset, reset_player
e1:SetValue(POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE)
local e2 = Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_GRANT)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType, TYPE_MONSTER))
e2:SetTarget(Auxiliary.TargetBoolFunction(Card.IsType, TYPE_MONSTER))
e2:SetTargetRange(LOCATION_HAND, 0)
e2:SetLabelObject(e1)
e2:SetReset(reset_player or reset)
......
......@@ -49,7 +49,7 @@ function RushDuel.OnlyFusionSummon(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.fuslimit)
e1:SetValue(Auxiliary.fuslimit)
card:RegisterEffect(e1)
local e2 = Effect.CreateEffect(card)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -152,11 +152,11 @@ end
-- 添加记述卡牌列表
function RushDuel.AddCodeList(card, ...)
for _, list in ipairs {...} do
local type = aux.GetValueType(list)
local type = Auxiliary.GetValueType(list)
if type == "number" then
aux.AddCodeList(card, list)
Auxiliary.AddCodeList(card, list)
elseif type == "table" then
aux.AddCodeList(card, table.unpack(list))
Auxiliary.AddCodeList(card, table.unpack(list))
end
end
end
......
......@@ -49,7 +49,7 @@ end
-- 将 卡片组/卡片/效果 转化为卡片组, 对于极大怪兽, 其素材也包含其中
function RushDuel.ToMaximunGroup(target)
local type = aux.GetValueType(target)
local type = Auxiliary.GetValueType(target)
local g = Group.CreateGroup()
if type == "Group" then
g:Merge(target)
......
......@@ -319,11 +319,11 @@ function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_rang
e:SetOperation(RushDuel.FusionOperation(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, leave, operation_action, limit_action))
return e
end
-- 融合效果 - 素材过滤
-- 融合召唤 - 素材过滤
function RushDuel.FusionMaterialFilter(c, filter, e)
return (not filter or filter(c)) and (not e or not c:IsImmuneToEffect(e))
end
-- 融合效果 - 融合召唤的怪兽过滤
-- 融合召唤 - 融合召唤的怪兽过滤
function RushDuel.FusionSpecialSummonFilter(c, e, tp, m, f, gc, chkf, filter)
RushDuel.CurrentFusionEffect = e
local res = c:IsType(TYPE_FUSION) and (not filter or filter(c, e, tp, m, f, chkf)) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false) and
......@@ -331,11 +331,11 @@ function RushDuel.FusionSpecialSummonFilter(c, e, tp, m, f, gc, chkf, filter)
RushDuel.CurrentFusionEffect = nil
return res
end
-- 融合效果 - 确认素材过滤
-- 融合召唤 - 确认素材过滤
function RushDuel.ConfirmCardFilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
-- 融合效果 - 获取融合素材与融合怪兽
-- 融合召唤 - 获取融合素材与融合怪兽
function RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, except, effect)
local chkf = tp
if except and self_leave then
......@@ -345,7 +345,7 @@ function RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_ra
end
local mg = Duel.GetFusionMaterial(tp):Filter(RushDuel.FusionMaterialFilter, except, matfilter, effect)
if s_range ~= 0 or o_range ~= 0 then
local ext = Duel.GetMatchingGroup(aux.NecroValleyFilter(exfilter), tp, s_range, o_range, except, effect)
local ext = Duel.GetMatchingGroup(Auxiliary.NecroValleyFilter(exfilter), tp, s_range, o_range, except, effect)
mg:Merge(ext)
end
local gc = nil
......@@ -374,7 +374,7 @@ function RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_ra
end
return fusionable, list, chkf, gc
end
-- 融合效果 - 进行融合召唤
-- 融合召唤 - 进行融合召唤
function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
local sg = Group.CreateGroup()
for _, data in ipairs(list) do
......@@ -396,7 +396,7 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
end
local data = options[1][3]
if #options > 1 then
data = aux.SelectFromOptions(tp, table.unpack(options))
data = Auxiliary.SelectFromOptions(tp, table.unpack(options))
end
local ce, mg = data[1], data[2]
RushDuel.CurrentFusionEffect = e
......@@ -444,7 +444,7 @@ function RushDuel.IsCanFusionSummon(e, tp, matfilter, spfilter, exfilter, s_rang
RushDuel.FusionExtraChecker = nil
return fusionable
end
-- 融合效果 - 目标
-- 融合召唤 - 目标
function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, action)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
......@@ -456,7 +456,7 @@ function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range,
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
end
-- 融合效果 - 操作
-- 融合召唤 - 处理
function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, including_self, self_leave, action, limit)
return function(e, tp, eg, ep, ev, re, r, rp)
RushDuel.FusionExtraChecker = RushDuel.FusionCheckLocation(e, self_leave, mat_check)
......@@ -474,7 +474,7 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
end
end
-- 强制进行融合召唤
-- 强制进行融合召唤
function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
......@@ -491,7 +491,7 @@ function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range,
return fc
end
-- 可以进行融合召唤
-- 可以进行融合召唤
function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
......@@ -543,7 +543,7 @@ function RushDuel.AnnounceFusionMaterialCode(player, card)
type = 1
elseif #codes > 0 then
-- 选择宣言的种类
type = Duel.SelectOption(player, aux.Stringid(120000001, 0), aux.Stringid(120000001, 1)) + 1
type = Duel.SelectOption(player, Auxiliary.Stringid(120000001, 0), Auxiliary.Stringid(120000001, 1)) + 1
end
if type == 1 then
-- 宣言常规怪兽
......
......@@ -44,7 +44,7 @@ function RushDuel.AddMaximumProcedure(card, max_atk, left_code, right_code)
mt.maximum_attack = max_atk
end
-- 极大召唤 手续
RushDuel.AddHandSpecialSummonProcedure(card, aux.Stringid(120000000, 0), RushDuel.MaximumSummonCondition(left_code, right_code), RushDuel.MaximumSummonTarget(left_code, right_code),
RushDuel.AddHandSpecialSummonProcedure(card, Auxiliary.Stringid(120000000, 0), RushDuel.MaximumSummonCondition(left_code, right_code), RushDuel.MaximumSummonTarget(left_code, right_code),
RushDuel.MaximumSummonOperation(left_code, right_code), RushDuel.MaximumSummonValue, POS_FACEUP_ATTACK)
-- 极大攻击力
local e1 = Effect.CreateEffect(card)
......@@ -86,7 +86,7 @@ end
function RushDuel.MaximumSummonTarget(left_code, right_code)
return function(e, tp, eg, ep, ev, re, r, rp, chk, c, og, min, max)
local mg = Duel.GetMatchingGroup(RushDuel.MaximumSummonFilter, tp, LOCATION_HAND, 0, nil, e, tp, left_code, right_code)
Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(120000000, 1))
Duel.Hint(HINT_SELECTMSG, tp, Auxiliary.Stringid(120000000, 1))
local cancel = Duel.GetCurrentChain() == 0
local g = mg:SelectSubGroup(tp, RushDuel.MaximumSummonCheck, cancel, 2, 2)
if g then
......
-- Rush Duel 仪式
RushDuel = RushDuel or {}
-- 当前的仪式效果
RushDuel.CurrentRitualEffect = nil
-- 额外的仪式检测
RushDuel.RitualExtraChecker = nil
-- 等级相同
RITUAL_LEVEL_EQUAL = 0x0
-- 等级超过
RITUAL_LEVEL_GREATER = 0x1
-- 攻击相同
RITUAL_ATTACK_EQUAL = 0x2
-- 攻击超过
RITUAL_ATTACK_GREATER = 0x3
-- 添加仪式手续
function RushDuel.AddRitualProcedure(card)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local e = Effect.CreateEffect(card)
e:SetType(EFFECT_TYPE_SINGLE)
e:SetCode(EFFECT_REMOVE_TYPE)
e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e:SetRange(0xff)
e:SetValue(TYPE_FUSION)
card:RegisterEffect(e)
end
-- 创建效果: 仪式术/仪式 召唤
function RushDuel.CreateRitualEffect(card, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, target_action, operation_action, limit_action, including_self, self_leave)
local self_range = s_range or 0
local opponent_range = o_range or 0
local move = mat_move or RushDuel.RitualToGrave
local include = including_self or false
local leave = self_leave or false
local e = Effect.CreateEffect(card)
e:SetTarget(RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, include, leave, target_action))
e:SetOperation(RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, leave, operation_action, limit_action))
return e
end
-- 仪式召唤 - 素材过滤
function RushDuel.RitualMaterialFilter(c, type, filter, e)
local ext = true
if type == RITUAL_LEVEL_EQUAL or type == RITUAL_LEVEL_GREATER then
ext = c:IsLevelAbove(1)
elseif type == RITUAL_ATTACK_EQUAL or type == RITUAL_ATTACK_GREATER then
ext = c:IsAttackAbove(1)
end
return ext and (not filter or filter(c)) and (not e or not c:IsImmuneToEffect(e))
end
-- 仪式召唤 - 仪式召唤的怪兽过滤
function RushDuel.RitualSpecialSummonFilter(c, e, tp, type, mat, f, gc, chkf, filter)
RushDuel.CurrentRitualEffect = e
local res = c:GetType() & 0x81 == 0x81 and (not filter or filter(c, e, tp, mat, f, chkf)) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_RITUAL, tp, false, false) and
RushDuel.CheckRitualMaterial(tp, c, type, mat, gc)
RushDuel.CurrentRitualEffect = nil
return res
end
-- 仪式召唤 - 获取可用的仪式素材
function RushDuel.GetRitualMaterial(tp, rc, type, mat)
local mg = mat:Filter(Card.IsCanBeRitualMaterial, rc, rc)
if rc.mat_filter then
mg = mg:Filter(rc.mat_filter, rc, tp)
end
local max = #mg
if type == RITUAL_LEVEL_EQUAL or type == RITUAL_LEVEL_GREATER then
max = rc:GetLevel()
end
return mg, max
end
-- 仪式召唤 - 检测仪式素材
function RushDuel.CheckRitualMaterial(tp, rc, type, mat, gc)
local mg, max = RushDuel.GetRitualMaterial(tp, rc, type, mat)
Auxiliary.GCheckAdditional = RushDuel.RitualCheckAdditional(rc, type)
local res = mg:CheckSubGroup(RushDuel.RitualChecker, 1, max, rc, tp, type, gc)
Auxiliary.GCheckAdditional = nil
return res
end
-- 仪式召唤 - 选择仪式素材
function RushDuel.SelectRitualMaterial(tp, rc, type, mat, gc)
local mg, max = RushDuel.GetRitualMaterial(tp, rc, type, mat)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FMATERIAL)
Auxiliary.GCheckAdditional = RushDuel.RitualCheckAdditional(rc, type)
local sg = mg:SelectSubGroup(tp, RushDuel.RitualChecker, true, 1, max, rc, tp, type, gc)
Auxiliary.GCheckAdditional = nil
return sg
end
-- 仪式召唤 - 素材不能超过必要的数量
function RushDuel.RitualCheckAdditional(rc, type)
local lv = rc:GetLevel()
local atk = rc:GetAttack()
if type == RITUAL_LEVEL_EQUAL then
return function(g)
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g)) and g:GetSum(Auxiliary.RitualCheckAdditionalLevel, rc) <= lv
end
elseif type == RITUAL_LEVEL_GREATER then
return function(g, ec)
if ec then
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g, ec)) and g:GetSum(Auxiliary.RitualCheckAdditionalLevel, rc) - Auxiliary.RitualCheckAdditionalLevel(ec, rc) <=
lv
else
return not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g)
end
end
elseif type == RITUAL_ATTACK_EQUAL then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(Auxiliary.GetCappedAttack) <= atk
end
elseif type == RITUAL_ATTACK_GREATER then
return function(g, ec)
if atk == 0 then
return #g <= 1
end
if ec then
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g, ec)) and g:GetSum(Auxiliary.GetCappedAttack) - Auxiliary.GetCappedAttack(ec) <= atk
else
return not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g)
end
end
end
end
-- 仪式召唤 - 仪式素材检测
function RushDuel.RitualChecker(mg, rc, tp, type, gc)
if gc and not mg:IsContains(gc) then
return false
elseif rc.mat_group_check and not rc.mat_group_check(mg, tp) then
return false
elseif RushDuel.RitualExtraChecker and not RushDuel.RitualExtraChecker(mg, tp, rc) then
return false
elseif Auxiliary.RCheckAdditional and not Auxiliary.RCheckAdditional(tp, mg, rc) then
return false
else
if type == RITUAL_LEVEL_EQUAL then
return mg:CheckWithSumEqual(Card.GetRitualLevel, rc:GetLevel(), #mg, #mg, rc)
elseif type == RITUAL_LEVEL_GREATER then
Duel.SetSelectedCard(mg)
return mg:CheckWithSumGreater(Card.GetRitualLevel, rc:GetLevel(), rc)
elseif type == RITUAL_ATTACK_EQUAL then
return mg:CheckWithSumEqual(Card.GetAttack, rc:GetAttack(), #mg, #mg, rc)
elseif type == RITUAL_ATTACK_GREATER then
Duel.SetSelectedCard(mg)
return mg:CheckWithSumGreater(Card.GetAttack, rc:GetAttack(), rc)
end
end
return false
end
-- 仪式召唤 - 确认素材过滤
function RushDuel.ConfirmCardFilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
-- 仪式召唤 - 获取仪式素材与仪式怪兽
function RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, except, effect)
local chkf = tp
if except and self_leave then
except:AddCard(e:GetHandler())
elseif self_leave then
except = e:GetHandler()
end
local mg = Duel.GetRitualMaterial(tp):Filter(RushDuel.RitualMaterialFilter, except, type, matfilter, effect)
if s_range ~= 0 or o_range ~= 0 then
local ext = Duel.GetMatchingGroup(Auxiliary.NecroValleyFilter(exfilter), tp, s_range, o_range, except, effect)
mg:Merge(ext:Filter(RushDuel.RitualMaterialFilter, nil, type))
end
local gc = nil
if including_self then
gc = e:GetHandler()
end
local sg = Duel.GetMatchingGroup(RushDuel.RitualSpecialSummonFilter, tp, LOCATION_EXTRA, 0, nil, e, tp, type, mg, nil, gc, chkf, spfilter)
local list = {}
local ritualable = false
if #sg > 0 then
table.insert(list, {nil, mg, sg})
ritualable = true
end
return ritualable, list, chkf, gc
end
-- 仪式召唤 - 进行仪式召唤
function RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move)
local sg = Group.CreateGroup()
for _, data in ipairs(list) do
sg:Merge(data[3])
end
::cancel::
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local rc = sg:Select(tp, 1, 1, nil):GetFirst()
local options = {}
for _, data in ipairs(list) do
local ce, sg = data[1], data[3]
if sg:IsContains(rc) then
if ce then
table.insert(options, {true, ce:GetDescription(), data})
else
table.insert(options, {true, 1168, data})
end
end
end
local data = options[1][3]
if #options > 1 then
data = Auxiliary.SelectFromOptions(tp, table.unpack(options))
end
local ce, mg = data[1], data[2]
RushDuel.CurrentRitualEffect = e
local mat = RushDuel.SelectRitualMaterial(tp, rc, type, mg, gc)
RushDuel.CurrentRitualEffect = nil
if not mat then
goto cancel
end
local cg = mat:Filter(RushDuel.ConfirmCardFilter, nil)
if #cg > 0 then
Duel.ConfirmCards(1 - tp, cg)
end
rc:SetMaterial(mat)
if ce then
local fop = ce:GetOperation()
fop(ce, e, tp, rc, mat)
else
mat_move(tp, mat, e)
end
Duel.BreakEffect()
Duel.SpecialSummon(rc, SUMMON_TYPE_RITUAL, tp, tp, false, false, POS_FACEUP)
rc:CompleteProcedure()
return rc, mat
end
-- 判断条件: 怪兽区域判断
function RushDuel.RitualCheckLocation(e, self_leave, extra)
return function(sg, tp, rc)
local mg = nil
if extra and not extra(tp, sg, rc) then
return false
elseif self_leave then
mg = Group.FromCards(e:GetHandler())
mg:Merge(sg)
else
mg = sg
end
if rc:IsLocation(LOCATION_EXTRA) then
return Duel.GetLocationCountFromEx(tp, tp, mg, rc) > 0
else
return Duel.GetMZoneCount(tp, mg) > 0
end
end
end
-- 判断条件: 是否可以进行仪式召唤
function RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, except)
RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check)
local ritualable = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, except)
RushDuel.RitualExtraChecker = nil
return ritualable
end
-- 仪式召唤 - 目标
function RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, target_action)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, nil)
end
if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp)
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
end
-- 仪式召唤 - 处理
function RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, including_self, self_leave, action, limit)
return function(e, tp, eg, ep, ev, re, r, rp)
RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check)
local ritualable, list, chkf, gc = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, nil, e)
if ritualable then
local fc, mat = RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move)
if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp, mat, fc)
end
end
RushDuel.RitualExtraChecker = nil
if limit ~= nil then
limit(e, tp, eg, ep, ev, re, r, rp)
end
end
end
-- 强制进行仪式召唤
function RushDuel.RitualSummon(type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check)
local ritualable, list, chkf, gc = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, include, leave, nil, e)
local rc = nil
if ritualable then
if break_effect then
Duel.BreakEffect()
end
rc = RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move)
end
RushDuel.RitualExtraChecker = nil
return rc
end
-- 可以进行仪式召唤
function RushDuel.CanRitualSummon(desc, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check)
local ritualable, list, chkf, gc = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, include, leave, nil, e)
local rc = nil
if ritualable and Duel.SelectYesNo(tp, desc) then
if break_effect then
Duel.BreakEffect()
end
rc = RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move)
end
RushDuel.RitualExtraChecker = nil
return rc
end
-- 素材去向: 墓地
function RushDuel.RitualToGrave(tp, mat)
Duel.SendtoGrave(mat, REASON_EFFECT + REASON_MATERIAL + REASON_RITUAL)
end
-- 素材去向: 卡组
function RushDuel.RitualToDeck(tp, mat)
local g = mat:Filter(Card.IsFacedown, nil)
if g:GetCount() > 0 then
Duel.ConfirmCards(1 - tp, g)
end
Duel.SendtoDeck(mat, nil, SEQ_DECKSHUFFLE, REASON_EFFECT + REASON_MATERIAL + REASON_RITUAL)
end
-- 素材去向: 卡组下面
function RushDuel.RitualToDeckBottom(tp, mat)
local g = mat:Filter(Card.IsFacedown, nil)
if g:GetCount() > 0 then
Duel.ConfirmCards(1 - tp, g)
end
Auxiliary.PlaceCardsOnDeckBottom(tp, mat, REASON_EFFECT + REASON_MATERIAL + REASON_RITUAL)
end
local m=120242201
local list={120263001,120263005}
local cm=_G["c"..m]
cm.name="元素英雄 闪光火焰翼侠"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Only Fusion Summon
RD.OnlyFusionSummon(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Damage
local e2=RD.ContinuousBattleDestroyingDamage(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.filter(c)
return c:IsRace(RACE_WARRIOR)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*300
end
--Damage
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120273101
local cm=_G["c"..m]
cm.name="耳语妖精"
function cm.initial_effect(c)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
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
--To Deck
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,2,nil,function(g)
RD.SendToDeckAndExists(g)
end)
end
\ No newline at end of file
local m=120273102
local list={120199052}
local cm=_G["c"..m]
cm.name="七宝神-良财"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(cm.target)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Special Summon Procedure
function cm.spconfilter(c)
return RD.IsDefense(c,2700) or c:IsCode(list[1])
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_GRAVE,0,1,nil)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
function cm.target(e,c)
if c:IsLocation(LOCATION_MZONE) then
return c:IsFaceup() and c:IsLevel(7)
else
return c:IsFacedown()
end
end
\ No newline at end of file
local m=120273105
local cm=_G["c"..m]
cm.name="元素循环"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
if c:IsLocation(LOCATION_EXTRA) then
return c:IsType(TYPE_FUSION) and c:IsLevel(6,7) and c:IsRace(RACE_WARRIOR)
else
return c:IsRace(RACE_WARRIOR) and c:IsAbleToGraveAsCost()
end
end
function cm.check(g)
if g:GetClassCount(Card.GetLocation)==1 then return false end
local mc,fc=g:GetFirst(),g:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
return aux.IsMaterialListCode(fc,mc:GetCode())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local sg=g:SelectSubGroup(tp,cm.check,false,2,2)
local mc,fc=sg:GetFirst(),sg:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
Duel.ConfirmCards(1-tp,fc)
Duel.SendtoGrave(mc,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(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()
Duel.SendtoGrave(g,REASON_EFFECT)
end)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not tc:IsRace(RACE_WARRIOR)
end
\ No newline at end of file
local m=120274069
local list={120196045,120271074}
local cm=_G["c"..m]
cm.name="流圣之公主"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
-- Draw Check
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
--Draw
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)==0
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)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation(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)
if RD.SendToHandAndExists(g,1-tp) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end)
end
-- Draw Check
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN1 or ph==PHASE_MAIN2 then
Duel.RegisterFlagEffect(rp,m,RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2,0,1)
end
end
\ No newline at end of file
local m=120277101
local list={120277102}
local cm=_G["c"..m]
cm.name="探索业力仪式"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateRitualEffect(c,RITUAL_LEVEL_GREATER,cm.matfilter,cm.spfilter)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.matfilter(c)
return c:IsFaceup() and c:IsOnField()
end
function cm.spfilter(c)
return c:IsCode(list[1])
end
\ No newline at end of file
local m=120277102
local cm=_G["c"..m]
cm.name="穿越侍·探索业力线性海牛侍"
function cm.initial_effect(c)
--Ritual
RD.AddRitualProcedure(c)
--Atk Down
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:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Cannot Activate
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ct=c:GetMaterialCount()
local atk=ct*-1000
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
if c:IsFaceup() and c:IsRelateToEffect(e) and ct>1 then
RD.AttachExtraAttackMonster(e,c,ct-1,aux.Stringid(m,ct-1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
......@@ -13,6 +13,7 @@ Duel.LoadScript("RDAttach.lua")
Duel.LoadScript("RDLimit.lua")
Duel.LoadScript("RDAction.lua")
Duel.LoadScript("RDFusion.lua")
Duel.LoadScript("RDRitual.lua")
Duel.LoadScript("RDEquip.lua")
Duel.LoadScript("RDSummon.lua")
RD = RushDuel
......
......@@ -7,6 +7,8 @@ https://yugipedia.com/wiki/Category:Rush_Duel_cards
- **March 8, 2025**: Structure Deck: Chimeratech Cyber (RD/SD0C-JP): `120278XXX`
- **March 8, 2025**: Structure Deck: Harpie Lady Sisters (RD/SD0D-JP): `120279XXX`
- **April 26, 2025**: Structure Deck: Black Magic Ritual (RD/SD0E-JP): `120280XXX`
- **December 20, 2024**: Excutie Duel Set (RD/JF25-JP): `1202422XX`
- **?? ??, 2025**: Special Victory Pack (RD/S244-JP): `1202731XX`
# Archived
- **April 3, 2020** : Saikyō Jump May 2020 promotional card (RD/SJMP-JP) : `120100XXX`
......
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