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

2026/2/26 新增:ORP4新卡

parent 02f3eb53
Pipeline #43448 passed with stages
in 9 minutes and 2 seconds
No preview for this file type
No preview for this file type
......@@ -34,10 +34,12 @@ EFFECT_CANNOT_BE_RITUAL_MATERIAL = 120294063 -- 不能作为仪式术召唤的
EFFECT_RITUAL_MATERIAL = 120300052 -- 额外的仪式素材
-- 标记
FLAG_SUMMON_TURN = 120000011 -- 召唤·特殊召唤的回合被盖放, 不再符合召唤·特殊召唤的回合的条件
FLAG_SUMMON_MAIN_PHASE = 120000012 -- 召唤·特殊召唤的主要阶段
FLAG_ATTACK_ANNOUNCED = 120000013 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
FLAG_ATTACH_EFFECT = 120000014 -- 通过效果赋予的效果, 不能重复叠加
FLAG_SUMMON_TURN = 120000011 -- 召唤·特殊召唤的回合
FLAG_FLIP_TURN = 120000012 -- 反转的回合
FLAG_SUMMON_MAIN_PHASE = 120000013 -- 召唤·特殊召唤的主要阶段
FLAG_FLIP_MAIN_PHASE = 120000014 -- 反转的主要阶段
FLAG_ATTACK_ANNOUNCED = 120000021 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
FLAG_ATTACH_EFFECT = 120000022 -- 通过效果赋予的效果, 不能重复叠加
FLAG_CANNOT_ATTACK_NEXT_TURN = 120231059 -- 下个回合不能攻击
FLAG_CANNOT_ATTACK_UNTIL_NEXT_TURN = 120247006 -- 直到下个回合, 不能攻击
FLAG_HAS_DRAW_IN_MAIN_PHASE = 120261037 -- 已在主要阶段抽卡
......@@ -54,6 +56,8 @@ HINTMSG_ANNOUNCE_MONSTER = Auxiliary.Stringid(120000001, 0) -- 宣言常规怪
HINTMSG_ANNOUNCE_LEGEND = Auxiliary.Stringid(120000001, 1) -- 宣言传说怪兽
HINTMSG_SUMMON_TURN = Auxiliary.Stringid(120000002, 0) -- 在这个回合召唤
HINTMSG_SPSUMMON_TURN = Auxiliary.Stringid(120000002, 1) -- 在这个回合特殊召唤
-- HINTMSG_SPSUMMON_TURN = Auxiliary.Stringid(120000002, 3) -- 在这个回合反转
HINTMSG_SPSUMMON_TURN = 1071 -- 在这个回合反转
HINTMSG_EFFECT_USED = Auxiliary.Stringid(120000002, 2) -- 已使用过效果
-- 异画卡: 复制Lua代码
......@@ -171,6 +175,33 @@ function RushDuel.CreateMultiChooseEffect(card, condition, cost, hint1, target1,
card:RegisterEffect(e2)
return e1, e2
end
-- 创建效果: 选择效果
function RushDuel.CreateMultiChooseEffect3(card, condition, cost, hint1, target1, operation1, hint2, target2, operation2, hint3, target3, operation3)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
if condition ~= nil then
e1:SetCondition(condition)
end
if cost ~= nil then
e1:SetCost(cost)
end
local e2 = e1:Clone()
local e3 = e1:Clone()
e1:SetDescription(hint1)
e2:SetDescription(hint2)
e3:SetDescription(hint3)
e1:SetTarget(RushDuel.MultiChooseEffectTarget(target1))
e2:SetTarget(RushDuel.MultiChooseEffectTarget(target2))
e3:SetTarget(RushDuel.MultiChooseEffectTarget(target3))
e1:SetOperation(operation1)
e2:SetOperation(operation2)
e3:SetOperation(operation3)
card:RegisterEffect(e1)
card:RegisterEffect(e2)
card:RegisterEffect(e3)
return e1, e2, e3
end
function RushDuel.MultiChooseEffectTarget(target)
if target ~= nil then
return target
......
......@@ -31,7 +31,7 @@ function RushDuel.IsSpecialSummonTurn(card)
return card:IsReason(REASON_SPSUMMON) and card:IsStatus(STATUS_SPSUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_TURN) ~= 0
end
-- 条件: 这张卡特殊召唤的自己主要阶段
function RushDuel.IsSpecialSummonMainPhase(card,type)
function RushDuel.IsSpecialSummonMainPhase(card, type)
return card:IsReason(REASON_SPSUMMON) and card:IsStatus(STATUS_SPSUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_MAIN_PHASE) ~= 0
and (not type or card:IsSummonType(type))
end
......@@ -40,6 +40,10 @@ function RushDuel.IsSummonOrSpecialSummonMainPhase(card)
return card:IsReason(REASON_SUMMON + REASON_SPSUMMON) and card:IsStatus(STATUS_SUMMON_TURN + STATUS_SPSUMMON_TURN)
and card:GetFlagEffect(FLAG_SUMMON_MAIN_PHASE) ~= 0
end
-- 条件: 这张卡反转的自己主要阶段
function RushDuel.IsFlipMainPhase(card)
return card:GetFlagEffect(FLAG_FLIP_MAIN_PHASE) ~= 0
end
-- 条件: 处于攻击中
function RushDuel.IsAttacking(effect)
local player = Duel.GetTurnPlayer()
......
......@@ -112,6 +112,14 @@ function RushDuel.InitFlag()
end
end)
end
local reg_flip = function(e, tp, eg, ep, ev, re, r, rp)
eg:ForEach(function(tc)
tc:RegisterFlagEffect(FLAG_FLIP_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_SPSUMMON_TURN)
if RushDuel.IsMainPhase() then
tc:RegisterFlagEffect(FLAG_FLIP_MAIN_PHASE, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_MAIN1 + PHASE_MAIN2, 0, 1)
end
end)
end
local reg_attack = function(e, tp, eg, ep, ev, re, r, rp)
Duel.RegisterFlagEffect(rp, FLAG_ATTACK_ANNOUNCED, RESET_PHASE + PHASE_DAMAGE, 0, 1)
end
......@@ -124,6 +132,7 @@ function RushDuel.InitFlag()
end
RushDuel.CreateFieldGlobalEffect(true, EVENT_SUMMON_SUCCESS, reg_summon)
RushDuel.CreateFieldGlobalEffect(true, EVENT_SPSUMMON_SUCCESS, reg_spsummon)
RushDuel.CreateFieldGlobalEffect(true, EVENT_FLIP, reg_flip)
RushDuel.CreateFieldGlobalEffect(true, EVENT_ATTACK_ANNOUNCE, reg_attack)
RushDuel.CreateFieldGlobalEffect(true, EVENT_DRAW, reg_draw)
end
......
local cm,m=GetID()
cm.name="地灵使 奥丝"
function cm.initial_effect(c)
--Control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_CONTROL)
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
--Control
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and RD.IsDefense(c,1500)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_MAXIMUM) and c:IsLevelBelow(8)
and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsControlerCanBeChanged()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsFlipMainPhase(c)
or Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_CONTROL,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.GetControl(g,tp)~=0
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="水灵使 艾莉娅"
function cm.initial_effect(c)
--Control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_CONTROL)
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
--Control
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and RD.IsDefense(c,1500)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_MAXIMUM) and c:IsLevelBelow(8)
and c:IsAttribute(ATTRIBUTE_WATER) and c:IsControlerCanBeChanged()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsFlipMainPhase(c)
or Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_CONTROL,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.GetControl(g,tp)~=0
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="火灵使 希塔"
function cm.initial_effect(c)
--Control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_CONTROL)
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
--Control
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and RD.IsDefense(c,1500)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_MAXIMUM) and c:IsLevelBelow(8)
and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsControlerCanBeChanged()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsFlipMainPhase(c)
or Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_CONTROL,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.GetControl(g,tp)~=0
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="风灵使 薇茵"
function cm.initial_effect(c)
--Control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_CONTROL)
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
--Control
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and RD.IsDefense(c,1500)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_MAXIMUM) and c:IsLevelBelow(8)
and c:IsAttribute(ATTRIBUTE_WIND) and c:IsControlerCanBeChanged()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsFlipMainPhase(c)
or Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_CONTROL,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.GetControl(g,tp)~=0
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120301009}
cm.name="地灵术师 奥丝"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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
--Discard Deck
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.filter(c,e,tp)
return c:IsLevelBelow(5) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
RD.CreateCannotActivateSameCodeEffect(e,aux.Stringid(m,2),m,tp,list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120301010}
cm.name="水灵术师 艾莉娅"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--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:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Deck
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,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.filter),tp,0,LOCATION_GRAVE,1,1,nil,function(g)
RD.SendToDeckTop(g,e,tp,REASON_EFFECT)
local tc=g:GetFirst()
local sumlimit=function(e,c)
return RD.IsSameOriginalCode(c,tc)
end
RD.CreateCannotSummonEffect(e,aux.Stringid(m,1),sumlimit,tp,0,1,RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
RD.CreateCannotFaceupSpecialSummonEffect(e,aux.Stringid(m,2),sumlimit,tp,0,1,RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end)
RD.CreateCannotActivateSameCodeEffect(e,aux.Stringid(m,3),m,tp,list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120301011}
cm.name="火灵术师 希塔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Damage
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(1-tp,500)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then
RD.CanDraw(aux.Stringid(m,1),tp,1,true)
end
RD.CreateCannotActivateSameCodeEffect(e,aux.Stringid(m,2),m,tp,list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120301012}
cm.name="风灵术师 薇茵"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK)
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
--To Deck
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsFaceup() not c:IsType(TYPE_MAXIMUM) and c:IsType(TYPE_EFFECT)
and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,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,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.SendToDeckBottom(g,e,tp,REASON_EFFECT)
end)
RD.CreateCannotActivateSameCodeEffect(e,aux.Stringid(m,1),m,tp,list[1])
end
\ No newline at end of file
local cm,m=GetID()
cm.name="灵术精炼"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
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)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(c,500,1900)
and RD.IsDefense(c,1500) and c:IsAbleToGraveAsCost()
end
function cm.spfilter(c,e,tp)
return c:IsLevel(5) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
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.IsPlayerCanDraw(tp,2) end
RD.TargetDraw(tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP,true)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.atktg(e,c)
return c:IsLevelAbove(9)
end
\ No newline at end of file
local cm,m=GetID()
local list={120253033,120301027}
cm.name="绝望狂魔神 终局魔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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
--Destroy
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.spfilter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,6,6)
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
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_ONFIELD,1,2,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP,true)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="绝望狂魔 死核魔"
function cm.initial_effect(c)
RD.AddRitualProcedure(c)
--Fusion Summon
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
end
--Fusion Summon
function cm.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)
and RD.IsDefense(c,2400)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="绝望狂魔 恶局魔"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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
--Destroy
function cm.costfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.exfilter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.excheck(g)
return g:GetClassCount(Card.GetAttribute)==1
end
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,4,4)
function cm.target(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.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_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local mg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,0,nil)
if mg:CheckSubGroup(cm.excheck,6,6) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP,true)
end
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120301025}
cm.name="绝望之仪"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateRitualEffect(c,RITUAL_ORIGINAL_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() and c:IsRace(RACE_FIEND)
end
function cm.spfilter(c)
return c:IsCode(list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120301034,120301025}
cm.name="绝望与切望"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.spfilter(c,e,tp)
return c:IsLevel(3,8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)
and RD.IsDefense(c,1200) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)
and c:IsAbleToHand()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsPlayerNoActivateInThisTurn(tp,list[1])
end
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(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_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_ONFIELD,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120235020,0}
cm.name="苍救的闪戟士 德古雷吉欧"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,cm.matfilter,list[1],list[2])
--Multi-Choose Effect
local e1,e2,e3=RD.CreateMultiChooseEffect3(c,nil,cm.cost,
aux.Stringid(m,1),cm.target1,cm.operation1,
aux.Stringid(m,2),cm.target2,cm.operation2,
aux.Stringid(m,3),cm.target3,cm.operation3)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR)
end
--Multi-Choose Effect
cm.cost=RD.CostSendDeckTopToGrave(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDirectAttack(e,c,aux.Stringid(m,4),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
--Atk Up
function cm.target2(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
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,1500,1500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
--Attack Twice
function cm.target3(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.operation3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachExtraAttack(e,c,1,aux.Stringid(m,5),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120235020,120235021,120196050}
cm.name="苍救王姬 莉姆丽丝"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.sumfilter(c,e,tp)
return (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR))
or c:IsRace(RACE_FAIRY)
end
--To Hand
function cm.thfilter(c)
return c:IsCode(list[1],list[2],list[3]) and c:IsAbleToHand()
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.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,2,1,nil,function(g)
if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120235052}
cm.name="苍救参谋 克雷莫德"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_COIN+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_coin=true
--To Grave
function cm.thfilter(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR)
and not RD.IsDefense(c,1200)) or c:IsCode(list[1])) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil,function(g)
if Duel.SendtoGrave(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,e,tp,REASON_EFFECT)
end)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120235052}
cm.name="苍救的祈誓"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_HAND+LOCATION_GRAVE)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,cm.matcheck)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.matfilter(c)
return cm.matfilter1(c) or cm.matfilter2(c)
end
function cm.matfilter1(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR)
end
function cm.matfilter2(c)
return c:IsFusionType(TYPE_EFFECT) and c:IsRace(RACE_FAIRY)
end
function cm.spfilter(c)
return c:IsRace(RACE_CELESTIALWARRIOR)
end
function cm.matcheck(tp,sg,fc)
return sg:Filter(cm.matfilter1,nil)==1
end
\ No newline at end of file
local cm,m=GetID()
local list={120196050}
cm.name="苍救的防御"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR)
and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and (c:IsRace(RACE_CELESTIALWARRIOR)
or c:IsRace(RACE_WARRIOR)) and RD.IsCanAttachBattleIndes(c,1)
end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
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
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,2,nil,function(g)
g:ForEach(function(tc)
RD.AttachBattleIndes(e,tc,1,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
RD.CanSelectAndSet(aux.Stringid(m,3),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
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