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

2024/8/30 新增:古代的机械,虚钢演机新卡

parent 47a61260
Pipeline #29441 passed with stages
in 8 minutes and 3 seconds
No preview for this file type
No preview for this file type
......@@ -107,19 +107,12 @@ function RushDuel.AttachAttackNotChainTrap(e, code, card, desc, reset, forced)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
end
e1:SetLabel(code)
e1:SetOperation(RushDuel.AttachAttackNotChainTrapOperation)
e1:SetOperation(RushDuel.AttackNotChainTrapOperation)
e1:SetReset(reset)
card:RegisterEffect(e1, forced)
local e2 = RushDuel.CreateSingleEffect(e, desc, card, EFFECT_ATTACK_NOT_CHAIN_TRAP, nil, reset, forced)
return e1, e2
end
function RushDuel.AttachAttackNotChainTrapOperation(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, e:GetLabel())
Duel.SetChainLimitTillChainEnd(RushDuel.AttachAttackNotChainTrapLimit)
end
function RushDuel.AttachAttackNotChainTrapLimit(e, rp, tp)
return not (rp ~= tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:IsActiveType(TYPE_TRAP))
end
-- 赋予: 回合结束时特效
function RushDuel.AttachEndPhase(e, card, player, code, operation, desc)
card:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, code, desc)
......@@ -208,3 +201,11 @@ function RushDuel.ChangeCode(e, card, code, reset, forced)
RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_FUSION_CODE, code, reset, forced)
return RushDuel.CreateSingleEffect(e, nil, card, EFFECT_CHANGE_CODE, code, reset, forced)
end
-- 赋予: 复制卡名
function RushDuel.CopyCode(e, card, target, reset, forced)
local code = target:GetLinkCode()
-- 使用 LinkCode 来判断传说卡
RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_LINK_CODE, code, reset, forced)
RushDuel.CreateSingleEffect(e, nil, card, EFFECT_ADD_FUSION_CODE, code, reset, forced)
return RushDuel.CreateSingleEffect(e, nil, card, EFFECT_CHANGE_CODE, code, reset, forced)
end
......@@ -26,6 +26,33 @@ FLAG_SUMMON_TURN = 120000011 -- 召唤·特殊召唤的回合被盖放, 不再
FLAG_ATTACK_ANNOUNCED = 120000012 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
FLAG_ATTACH_EFFECT = 120000013 -- 通过效果赋予的效果, 不能重复叠加
-- 创建效果: 这张卡不能特殊召唤
function RushDuel.CannotSpecialSummon(card, range)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
if range then
e1:SetRange(range)
end
card:RegisterEffect(e1)
return e1
end
-- 创建效果: 这张卡不用融合术召唤不能特殊召唤
function RushDuel.OnlyFusionSummon(card)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.fuslimit)
card:RegisterEffect(e1)
local e2 = Effect.CreateEffect(card)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ONLY_FUSION_SUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
card:RegisterEffect(e2)
return e1, e2
end
-- 创建效果: 玩家对象的全局效果
function RushDuel.CreatePlayerTargetGlobalEffect(code, value)
local e1 = Effect.GlobalEffect()
......@@ -96,18 +123,26 @@ function RushDuel.CreateMultiChooseEffect(card, condition, cost, hint1, target1,
local e2 = e1:Clone()
e1:SetDescription(hint1)
e2:SetDescription(hint2)
if target1 ~= nil then
e1:SetTarget(target1)
end
if target2 ~= nil then
e2:SetTarget(target2)
end
e1:SetTarget(RushDuel.MultiChooseEffectTarget(target1))
e2:SetTarget(RushDuel.MultiChooseEffectTarget(target2))
e1:SetOperation(operation1)
e2:SetOperation(operation2)
card:RegisterEffect(e1)
card:RegisterEffect(e2)
return e1, e2
end
function RushDuel.MultiChooseEffectTarget(target)
if target ~= nil then
return target
else
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
end
Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
end
end
end
-- 添加记述卡牌列表
function RushDuel.AddCodeList(card, ...)
......
......@@ -58,6 +58,16 @@ end
function RushDuel.IsAbleToHandOrSpecialSummon(card, effect, player, position)
return card:IsAbleToHand() or (Duel.GetLocationCount(player, LOCATION_MZONE) > 0 and RushDuel.IsCanBeSpecialSummoned(card, effect, player, position))
end
-- 条件: 是否拥有永续效果
function RushDuel.IsHasContinuousEffect(card)
local has_effect = card.continuous_effect
if RushDuel.IsMaximumMode(card) then
card:GetOverlayGroup():ForEach(function(tc)
has_effect = has_effect or tc.continuous_effect
end)
end
return has_effect
end
-- 条件: 位置变化前的控制者
function RushDuel.IsPreviousControler(card, player)
......@@ -173,13 +183,7 @@ function RushDuel.IsCanAttachEffectIndes(card, player, value)
end
-- 条件: 可否赋予效果 - 永续效果无效化
function RushDuel.IsCanAttachDisableContinuous(card)
local has_effect = card.continuous_effect
if RushDuel.IsMaximumMode(card) then
card:GetOverlayGroup():ForEach(function(tc)
has_effect = has_effect or tc.continuous_effect
end)
end
return has_effect and not card:IsHasEffect(EFFECT_DISABLE)
return RushDuel.IsHasContinuousEffect(card) and not card:IsHasEffect(EFFECT_DISABLE)
end
-- 条件: 是否可以使用双重解放
......
-- Rush Duel 永续效果
RushDuel = RushDuel or {}
-- 永续效果: 攻击宣言时, 对方不能把陷阱卡发动
function RushDuel.ContinuousAttackNotChainTrap(card)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetLabel(card:GetOriginalCode())
e1:SetOperation(RushDuel.AttackNotChainTrapOperation)
card:RegisterEffect(e1)
return e1
end
function RushDuel.AttackNotChainTrapOperation(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, e:GetLabel())
Duel.SetChainLimitTillChainEnd(RushDuel.AttachAttackNotChainTrapLimit)
end
function RushDuel.AttachAttackNotChainTrapLimit(e, rp, tp)
return not (rp ~= tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:IsActiveType(TYPE_TRAP))
end
-- 永续效果: 战斗破坏怪兽送去墓地时, 造成效果伤害
function RushDuel.ContinuousBattleDestroyingDamage(card)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetLabel(card:GetOriginalCode())
e1:SetCondition(RushDuel.BattleDestroyingDamageCondition)
e1:SetOperation(RushDuel.BattleDestroyingDamageOperation)
card:RegisterEffect(e1)
return e1
end
function RushDuel.BattleDestroyingDamageCondition(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local tc = c:GetBattleTarget()
return c:IsRelateToBattle() and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER)
end
function RushDuel.BattleDestroyingDamageOperation(e, tp, eg, ep, ev, re, r, rp)
local tc = e:GetHandler():GetBattleTarget()
if tc then
local damage = RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD, 0, e:GetLabel())
Duel.Damage(1 - tp, damage, REASON_EFFECT)
end
end
......@@ -211,22 +211,6 @@ function RushDuel.FusionProcedureOperation(insf, sub, checker, min, max, ...)
end
end
-- 这张卡不用融合术召唤不能特殊召唤
function RushDuel.OnlyFusionSummon(card)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.fuslimit)
card:RegisterEffect(e1)
local e2 = Effect.CreateEffect(card)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ONLY_FUSION_SUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
card:RegisterEffect(e2)
return e2
end
-- 创建效果: 融合术/结合 召唤
function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, target_action, operation_action, including_self)
local self_range = s_range or 0
......
......@@ -5,17 +5,24 @@ LEGEND_MONSTER = 120000000
LEGEND_SPELL = 120000001
LEGEND_TRAP = 120000002
RushDuel.LegendCodes = { -- 青眼白龙
{120120000, 120198001, 120231001}, -- 真红眼黑龙
{120125001, 120203016, 120229101}, -- 黑魔术师
{120130000, 120203015, 120254001}, -- 死者苏生
{120194004, 120195004}, -- 天使的施舍
{120196049, 120195005}, -- 海龙-泰达路斯
{120199000, 120239060}}
RushDuel.LegendCodes = {
-- 青眼白龙
{120120000, 120198001, 120231001},
-- 真红眼黑龙
{120125001, 120203016, 120229101},
-- 黑魔术师
{120130000, 120203015, 120254001},
-- 死者苏生
{120194004, 120195004},
-- 天使的施舍
{120196049, 120195005},
-- 海龙-泰达路斯
{120199000, 120239060}
}
-- 初始化传说卡
function RushDuel.InitLegend()
local g = Duel.GetMatchingGroup(Card.IsCode, 0, 0xff, 0xff, nil, LEGEND_MONSTER, LEGEND_SPELL, LEGEND_TRAP)
local g = Duel.GetMatchingGroup(RushDuel.IsLegendCard, 0, 0xff, 0xff, nil, true)
g:ForEach(RushDuel.InitLegendCard)
end
function RushDuel.InitLegendCard(c)
......@@ -23,7 +30,7 @@ function RushDuel.InitLegendCard(c)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEGEND_CARD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(0xff)
e1:SetValue(code)
c:RegisterEffect(e1, true)
......@@ -44,8 +51,12 @@ function RushDuel.GetLegendCode(code)
end
-- 条件: 是否为传说卡
function RushDuel.IsLegendCard(card)
return card:IsHasEffect(EFFECT_LEGEND_CARD)
function RushDuel.IsLegendCard(card, original)
if original then
return card:IsOriginalCodeRule(LEGEND_MONSTER, LEGEND_SPELL, LEGEND_TRAP)
else
return card:IsHasEffect(EFFECT_LEGEND_CARD)
end
end
-- 条件: 是否为同名卡
......@@ -86,3 +97,15 @@ function RushDuel.EnableChangeCode(c, code, location, condition)
c:RegisterEffect(e3)
return e1, e2, e3
end
-- 当作传说卡 (赝品)
function RushDuel.EnableFakeLegend(card, location)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEGEND_CARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(location)
e1:SetValue(0)
card:RegisterEffect(e1, true)
return e1
end
......@@ -374,3 +374,18 @@ function RushDuel.AddHandSpecialSummonProcedure(card, desc, condition, target, o
card:RegisterEffect(e1)
return e1
end
-- 上级召唤所需的解放数量可以减少
function RushDuel.DecreaseSummonTribute(card, condition, value)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DECREASE_TRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
if condition then
e1:SetCondition(condition)
end
e1:SetRange(LOCATION_HAND)
e1:SetValue(value or 0x1)
card:RegisterEffect(e1)
return e1
end
......@@ -18,6 +18,7 @@ cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Attack Thrice
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),2) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -38,6 +39,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,6 +17,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,0,LOCATION_MZONE,nil)
......
......@@ -18,6 +18,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -44,6 +45,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -20,6 +20,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_GRAVE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter2,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,6 +16,7 @@ cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
--Atk & Def Down(Single)
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
......@@ -28,6 +29,7 @@ function cm.downfilter(c)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil)
......
......@@ -19,6 +19,7 @@ function cm.atkfilter(c)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -35,6 +36,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,6 +33,7 @@ end
--Pierce
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -23,6 +23,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ function cm.thfilter(c)
end
function cm.target2(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
......
......@@ -16,6 +16,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -28,6 +29,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -21,6 +21,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(tp,2000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then
......@@ -40,6 +41,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetRecover(tp,1000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if RD.Recover()~=0 then
......
......@@ -40,6 +40,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,6 +17,7 @@ function cm.thfilter(c)
end
function cm.target1(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -28,6 +29,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,13 +2,8 @@ local m=120205000
local cm=_G["c"..m]
cm.name="创世神"
function cm.initial_effect(c)
--Special Summon Limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e0)
--Cannot Special Summon
RD.CannotSpecialSummon(c,LOCATION_GRAVE)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -15,6 +15,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Down
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
......@@ -30,6 +31,7 @@ end
--Direct Attack
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -22,6 +22,7 @@ cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,aux.dncheck,2,2)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(1-tp,1500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.Damage()
......@@ -30,6 +31,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,6 +18,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,6 +18,7 @@ cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
RD.TargetDraw(tp,2)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ function cm.downfilter(c)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.downfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),cm.downfilter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
......
......@@ -25,6 +25,7 @@ function cm.filter(c)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -39,6 +40,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,6 +16,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk 0
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,3,nil,function(g)
......@@ -38,6 +39,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -15,6 +15,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......@@ -31,6 +32,7 @@ end
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......
......@@ -17,6 +17,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -33,6 +34,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -15,6 +15,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -34,6 +35,7 @@ end
function cm.target1(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -21,6 +21,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(tp,2000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then
......@@ -40,6 +41,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetRecover(tp,1000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if RD.Recover()~=0 then
......
......@@ -38,8 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetOperatedGroup():GetFirst()
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetLinkCode()
RD.ChangeCode(e,c,code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CopyCode(e,c,tc,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
......@@ -3,11 +3,7 @@ local cm=_G["c"..m]
cm.name="升腾之战士 吉尔福德"
function cm.initial_effect(c)
--Cannot Special Summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
RD.CannotSpecialSummon(c)
--Multiple Attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -3,11 +3,7 @@ local cm=_G["c"..m]
cm.name="传说的战士 吉尔福德"
function cm.initial_effect(c)
--Cannot Special Summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
RD.CannotSpecialSummon(c)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -27,6 +27,7 @@ function cm.filter(c)
end
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
......@@ -40,6 +41,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,6 +31,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsAbleToEnterBP() and g:CheckSubGroup(cm.check,2,2) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(aux.Stringid(m,3),cm.filter1,cm.check,tp,LOCATION_MZONE,0,2,2,nil,function(g)
......@@ -47,6 +48,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetMZoneCount(tp)>1
and g:CheckSubGroup(cm.check,2,2,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,6 +27,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -42,6 +43,7 @@ function cm.thfilter(c)
end
function cm.target2(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,6 +18,7 @@ function cm.filter(c)
end
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -29,6 +30,7 @@ end
--Multiple Attack
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttackMonster(e:GetHandler(),1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -3,11 +3,7 @@ local cm=_G["c"..m]
cm.name="虚无魔人"
function cm.initial_effect(c)
--Cannot Special Summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
RD.CannotSpecialSummon(c)
--Cannot Special Summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -7,12 +7,8 @@ function cm.initial_effect(c)
--Maximum Summon
RD.AddMaximumProcedure(c,4000,list[1],list[2])
--Cannot Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
local e1=RD.ContinuousAttackNotChainTrap(c)
e1:SetCondition(cm.actcon)
e1:SetOperation(cm.actlimit)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -32,13 +28,6 @@ end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.actlimit(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.SetChainLimitTillChainEnd(cm.chainlimit)
end
function cm.chainlimit(e,rp,tp)
return not (rp~=tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:IsActiveType(TYPE_TRAP))
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
function cm.indcon(e)
......
......@@ -31,8 +31,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local filter=RD.Filter(cm.filter,c:GetCode())
RD.SelectAndDoAction(aux.Stringid(m,1),aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local code=g:GetFirst():GetLinkCode()
RD.ChangeCode(e,c,code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CopyCode(e,c,g:GetFirst(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
......@@ -19,6 +19,7 @@ cm.cost=RD.CostSendDeckTopToGrave(1)
--Atk Up
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -31,6 +32,7 @@ end
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return RD.IsCanAttachEffectIndes(e:GetHandler(),tp,cm.indval) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -18,6 +18,7 @@ function cm.filter(c)
end
function cm.target1(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,3),cm.filter,tp,LOCATION_MZONE,0,1,2,nil,function(g)
......
......@@ -21,6 +21,7 @@ cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
--Direct Attack
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -35,6 +36,7 @@ end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,6 +24,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
......@@ -39,6 +40,7 @@ function cm.thfilter(c)
end
function cm.target2(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -36,8 +36,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local filter=RD.Filter(cm.filter,c:GetCode())
RD.SelectAndDoAction(aux.Stringid(m,1),aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local code=g:GetFirst():GetLinkCode()
RD.ChangeCode(e,c,code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CopyCode(e,c,g:GetFirst(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndSet(aux.Stringid(m,2),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,true)
end)
end
......
......@@ -24,7 +24,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
local res=d1+d2
if res==7 or res==11 then
RD.SelectAndDoAction(HINTMSG_RTOHAND,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
RD.SelectAndDoAction(HINTMSG_TODECK,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
RD.SendToOpponentDeckBottom(g,tp)
end)
elseif res==2 or res==3 or res==12 then
......
......@@ -9,13 +9,7 @@ function cm.initial_effect(c)
--Only Fusion Summon
RD.OnlyFusionSummon(c)
--Damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(cm.damcon)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
local e1=RD.ContinuousBattleDestroyingDamage(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
......
......@@ -17,13 +17,7 @@ function cm.initial_effect(c)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(cm.damcon)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
local e2=RD.ContinuousBattleDestroyingDamage(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
......
local m=120271004
local cm=_G["c"..m]
cm.name="古代的机械巨人"
function cm.initial_effect(c)
--Cannot Special Summon
RD.CannotSpecialSummon(c)
-- Cannot Activate
local e1=RD.ContinuousAttackNotChainTrap(c)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
local m=120271005
local cm=_G["c"..m]
cm.name="古代的机械恐兽"
function cm.initial_effect(c)
-- Decrease Tribute
RD.DecreaseSummonTribute(c,cm.sumcon,0x1)
-- Cannot Activate
local e1=RD.ContinuousAttackNotChainTrap(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
-- Decrease Tribute
function cm.confilter(c)
return c:IsFaceup() and RD.IsHasContinuousEffect(c)
and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
end
function cm.sumcon(e)
return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
local m=120271006
local list={120271004,120271008,120271007}
local cm=_G["c"..m]
cm.name="古代的机械强兵"
function cm.initial_effect(c)
-- Decrease Tribute
RD.DecreaseSummonTribute(c,cm.sumcon,0x1)
--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:SetCondition(cm.atkcon)
e1:SetValue(1000)
c:RegisterEffect(e1)
-- Cannot Activate
local e2=RD.ContinuousAttackNotChainTrap(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
-- Decrease Tribute
function cm.confilter(c)
return c:IsFaceup() and (c:IsLinkCode(list[1]) or c:IsCode(list[2],list[3]))
end
function cm.sumcon(e)
return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--Atk Up
function cm.atkcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
\ No newline at end of file
local m=120271007
local cm=_G["c"..m]
cm.name="古代的机械兽"
function cm.initial_effect(c)
RD.CannotSpecialSummon(c)
-- Cannot Activate
local e1=RD.ContinuousAttackNotChainTrap(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
\ No newline at end of file
local m=120271008
local cm=_G["c"..m]
cm.name="古代的机械士兵"
function cm.initial_effect(c)
-- Cannot Activate
local e1=RD.ContinuousAttackNotChainTrap(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
\ No newline at end of file
local m=120271014
local cm=_G["c"..m]
cm.name="齿车街区"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.uptg)
e2:SetValue(200)
c:RegisterEffect(e2)
--Decrease Tribute
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DECREASE_TRIBUTE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
e3:SetTarget(cm.dectg)
e3:SetValue(0x1)
c:RegisterEffect(e3)
end
--Atk & Def Up
function cm.uptg(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
end
--Decrease Tribute
function cm.dectg(e,c)
return RD.IsDefense(c,c:GetAttack()) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
local m=120271016
local list={120196006}
local cm=_G["c"..m]
cm.name="重钢铁徽章之阿修罗明星"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],cm.matfilter)
--Multi-Choose Effect
local e1,e2=RD.CreateMultiChooseEffect(c,nil,cm.cost,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetCategory(CATEGORY_ATKCHANGE)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsLevel(9) and c:IsRace(RACE_CYBORG)
end
--Multi-Choose Effect
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLevel(9) and c:IsRace(RACE_CYBORG) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)
end
--Atk Up
function cm.atkfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_CYBORG)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.SelectAndDoAction(aux.Stringid(m,3),cm.atkfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,c,g:GetFirst():GetAttack(),0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local m=120271017
local list={120196006,120196002}
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])
--Multi-Choose Effect
local e1,e2=RD.CreateMultiChooseEffect(c,nil,nil,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetCategory(CATEGORY_DESTROY)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLevel(9) and c:IsRace(RACE_CYBORG) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENCE)
end
--Destroy
function cm.desfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_CYBORG)
end
function cm.target2(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
local m=120271025
local list={120196006,120175003}
local cm=_G["c"..m]
cm.name="虚钢再演机"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Change Code
function cm.tdfilter(c)
return c:IsLinkCode(list[2]) and c:IsAbleToDeck()
end
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])
end
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect()
if RD.SendToDeckBottom(g)~=0 then
RD.CanDraw(aux.Stringid(m,2),tp,2)
end
end)
end
end
\ No newline at end of file
local m=120271029
local list={120196006,120196050}
local cm=_G["c"..m]
cm.name="虚钢领演机"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Change Code
function cm.filter(c)
return ((c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_LIGHT) and RD.IsDefense(c,500))
or c:IsCode(list[2])) and c:IsAbleToHand()
end
function cm.check(g)
if g:GetCount()<2 then return true end
local tc1=g:GetFirst()
local tc2=g:GetNext()
return (tc1:IsType(TYPE_NORMAL) and tc2:IsCode(list[2]))
or (tc2:IsType(TYPE_NORMAL) and tc1:IsCode(list[2]))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1])
end
cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),cm.check,tp,LOCATION_GRAVE,0,1,2,nil,function(g)
Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp)
end)
end
end
\ No newline at end of file
local m=120271036
local list={120196050}
local cm=_G["c"..m]
cm.name="钢铁徽章融合"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.spfilter(c)
return c:IsRace(RACE_CYBORG)
end
function cm.thfilter(c,mat)
return (c:IsCode(list[1]) or (mat:IsContains(c) and c:IsLocation(LOCATION_GRAVE))) and c:IsAbleToHand()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
local filter=RD.Filter(cm.thfilter,mat)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp)
end)
end
\ No newline at end of file
......@@ -8,6 +8,7 @@ Duel.LoadScript("RDCondition.lua")
Duel.LoadScript("RDCost.lua")
Duel.LoadScript("RDTarget.lua")
Duel.LoadScript("RDValue.lua")
Duel.LoadScript("RDContinuous.lua")
Duel.LoadScript("RDAttach.lua")
Duel.LoadScript("RDLimit.lua")
Duel.LoadScript("RDAction.lua")
......
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