Commit 562d821c authored by 未闻皂名's avatar 未闻皂名

2025/9/17 新增:混沌战士新卡,更新翻译

parent e9b8b990
Pipeline #40641 passed with stages
in 5 minutes and 38 seconds
No preview for this file type
......@@ -483,6 +483,29 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
end
return Group.CreateGroup(), g
end
-- 操作: 翻开卡组并可以选择卡(包含额外的卡片组)
function RushDuel.RevealDeckTopAndCanSelectEx(player, count, exg, desc, hint, filter, min, max, ...)
Duel.ConfirmDecktop(player, count)
local g = Duel.GetDecktopGroup(player, count)
if g:GetCount() > 0 then
local mg = g:Filter(filter, nil, ...)
mg:Merge(exg)
if mg:GetCount() >= min then
::cancel::
if Duel.SelectYesNo(player, desc) then
Duel.Hint(HINT_SELECTMSG, player, hint)
local sg = RushDuel.SelectGroup(player, mg, min, max, ...)
if sg == nil then
goto cancel
elseif sg:GetCount() > 0 then
g:Sub(sg)
return sg, g
end
end
end
end
return Group.CreateGroup(), g
end
-- 操作: 从卡组上面把卡送去墓地, 并可以选择被送去墓地的卡片
function RushDuel.SendDeckTopToGraveAndCanSelect(player, count, desc, hint, filter, min, max, ...)
if Duel.DiscardDeck(player, count, REASON_EFFECT) ~= 0 then
......
......@@ -375,7 +375,23 @@ function RushDuel.CostMerge(cost1, cost2)
cost2(e, tp, eg, ep, ev, re, r, rp, chk)
end
end
-- 代价: 从2个代价中选择1个
-- 代价: 从2个代价中选择1个(分开选)
function RushDuel.CostChoose(hit1, cost1, hit2, cost2)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local s1 = cost1(e, tp, eg, ep, ev, re, r, rp, 0)
local s2 = cost2(e, tp, eg, ep, ev, re, r, rp, 0)
if chk == 0 then
return s1 or s2
end
local op = aux.SelectFromOptions(tp, {s1, hit1}, {s2, hit2})
if op == 1 then
cost1(e, tp, eg, ep, ev, re, r, rp, 1)
elseif op == 2 then
cost2(e, tp, eg, ep, ev, re, r, rp, 1)
end
end
end
-- 代价: 从2个代价中选择1个(同时选)
function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, count1, action1, filter2, check2, zone2, count2, action2)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local g1 = Duel.GetMatchingGroup(filter1, tp, zone1, 0, nil)
......@@ -429,4 +445,4 @@ function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, cou
end
end
end
end
end
\ No newline at end of file
......@@ -26,20 +26,7 @@ function cm.filter(c)
end
cm.cost1=RD.CostSendOnFieldToGrave(Card.IsAbleToGraveAsCost,1,1,true)
cm.cost2=RD.CostSendDeckTopToGrave(2)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local check1=cm.cost1(e,tp,eg,ep,ev,re,r,rp,0)
local check2=cm.cost2(e,tp,eg,ep,ev,re,r,rp,0)
if chk==0 then return check1 or check2 end
local op=aux.SelectFromOptions(tp,
{check1,aux.Stringid(m,3),1},
{check2,aux.Stringid(m,4),2}
)
if op==1 then
cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
else
cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
cm.cost=RD.CostChoose(aux.Stringid(m,3),cm.cost1,aux.Stringid(m,4),cm.cost2)
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
......
local cm,m=GetID()
cm.name="幻龙帝 凌德鲁姆"
cm.name="幻龙帝 林多尔姆"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
......
local cm,m=GetID()
cm.name="龙帝 凌德鲁姆"
cm.name="龙帝 林多尔姆"
function cm.initial_effect(c)
--To Deck
local e1=Effect.CreateEffect(c)
......
local cm,m=GetID()
local list={120291002,120291003}
cm.name="龙帝家臣 拉赫"
cm.name="龙帝家臣 拉赫"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Counter
......
local cm,m=GetID()
cm.name="明镜图拉之臂"
cm.name="天臂之造物"
function cm.initial_effect(c)
--Cannot Trigger
local e1=Effect.CreateEffect(c)
......
local cm,m=GetID()
cm.name="混沌剑刃骑手"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
return c:IsLevel(4) and c:IsAttack(500) and RD.IsDefense(c,1000) and not c:IsPublic()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsLevel(8) and c:IsRace(RACE_WARRIOR)
end
cm.cost1=RD.CostShowHand(cm.costfilter,1,1)
cm.cost2=RD.CostSendDeckTopToGrave(1)
cm.cost=RD.CostMerge(cm.cost1,cm.cost2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),cm.exfilter,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.AttachAtkDef(e,sg:GetFirst(),1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
cm.name="混沌素材"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
return c:IsLevel(4) and c:IsAttack(500) and RD.IsDefense(c,1000) and not c:IsPublic()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsLevel(8) and c:IsRace(RACE_WARRIOR)
end
cm.cost1=RD.CostShowHand(cm.costfilter,1,1)
cm.cost2=RD.CostSendDeckTopToGrave(2)
cm.cost=RD.CostMerge(cm.cost1,cm.cost2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then
Duel.BreakEffect()
RD.AttachLevel(e,c,4,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
local cm,m=GetID()
cm.name="混沌祈祷师"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
return c:IsLevel(4) and c:IsAttack(500) and RD.IsDefense(c,1000) and c:IsAbleToDeckAsCost()
end
function cm.desfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,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.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_SZONE,1,1,nil,function(g)
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120293038,120293039}
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_TOHAND+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
--Discard Deck
function cm.costfilter1(c)
return c:IsAbleToGraveAsCost()
end
function cm.costfilter2(c)
return c:IsLevel(4) and c:IsAttack(500) and RD.IsDefense(c,1000) and not c:IsPublic()
end
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
cm.cost1=RD.CostSendHandToGrave(cm.costfilter1,1,1)
cm.cost2=RD.CostShowHand(cm.costfilter2,1,1)
cm.cost=RD.CostChoose(aux.Stringid(m,1),cm.cost1,aux.Stringid(m,2),cm.cost2)
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 RD.SendDeckTopToGraveAndExists(tp,1) then
RD.CanSelectAndDoAction(aux.Stringid(m,3),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={120293001}
cm.name="超战士的一击"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.filter(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,0,1,nil)
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
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.SendToDeckAndExists(g,e,tp,REASON_EFFECT)
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120293001}
cm.name="混沌祭具"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return 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.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,nil)
local sg,g=RD.RevealDeckTopAndCanSelectEx(tp,3,mg,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.filter,1,1)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
RD.SendToHandAndExists(sg,e,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
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_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
and c:IsAttack(500) and RD.IsDefense(c,1000) and c:IsAbleToHand()
end
function cm.posfilter(c,e,tp)
return not c:IsPosition(POS_FACEUP_DEFENSE) and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.target(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.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then
local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect()
RD.ChangePosition(sg,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)
end)
end
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