Commit 20b384ec authored by 未闻皂名's avatar 未闻皂名

2024/10/26 新增:kp19新卡

parent 82055342
No preview for this file type
......@@ -371,7 +371,7 @@ function RushDuel.RevealDeckTopAndCanSelect(player, count, desc, hint, filter, m
::cancel::
if Duel.SelectYesNo(player, desc) then
Duel.Hint(HINT_SELECTMSG, player, hint)
local sg = RushDuel.SelectGroup(player, mg, min, max)
local sg = RushDuel.SelectGroup(player, mg, min, max, ...)
if sg == nil then
goto cancel
elseif sg:GetCount() > 0 then
......@@ -405,7 +405,7 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
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
local g = Duel.GetOperatedGroup()
......@@ -415,7 +415,31 @@ function RushDuel.SendDeckTopToGraveAndCanSelect(player, count, desc, hint, filt
::cancel::
if Duel.SelectYesNo(player, desc) then
Duel.Hint(HINT_SELECTMSG, player, hint)
local sg = RushDuel.SelectGroup(player, mg, min, max)
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
return Group.CreateGroup(), Group.CreateGroup()
end
-- 操作: 从卡组上面把卡送去墓地, 并可以选择被送去墓地的卡片 (子卡片组)
function RushDuel.SendDeckTopToGraveAndCanSelectGroup(player, count, desc, hint, filter, check, min, max, ...)
if Duel.DiscardDeck(player, count, REASON_EFFECT) ~= 0 then
local g = Duel.GetOperatedGroup()
if g:GetCount() > 0 then
local mg = g:Filter(filter, nil, ...)
if mg:GetCount() >= min then
::cancel::
if Duel.SelectYesNo(player, desc) then
Duel.Hint(HINT_SELECTMSG, player, hint)
local sg = mg:SelectSubGroup(player, check, true, min, max, ...)
if sg == nil then
goto cancel
elseif sg:GetCount() > 0 then
......
local m=120272020
local list={120263010}
local cm=_G["c"..m]
cm.name="锐进马达 压缩机"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--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
--Atk Down
function cm.filter(c)
return c:IsFaceup() and (c:IsCode(list[1])
or (c:IsType(TYPE_FUSION) and c:IsLevel(7) and c:IsRace(RACE_WARRIOR)))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
cm.cost=RD.CostSendSelfToGrave()
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)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-2000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
\ No newline at end of file
local m=120272047
local list={120263009,120263008}
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)
--Direct Attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
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
--Direct Attack
function cm.confilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.IsAbleToEnterBP()
and RD.IsCanAttachDirectAttack(c)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_SZONE,0,1,nil)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDirectAttack(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local m=120272054
local cm=_G["c"..m]
cm.name="语中传承的英雄追忆"
function cm.initial_effect(c)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+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.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.thfilter(c)
return RD.IsLegendCard(c) and c:IsType(TYPE_MONSTER+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.check(g)
return not (g:IsExists(Card.IsType,2,nil,TYPE_MONSTER) or g:IsExists(Card.IsType,2,nil,TYPE_TRAP))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
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.IsPlayerCanDiscardDeck(tp,4) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg,og=RD.SendDeckTopToGraveAndCanSelectGroup(tp,4,aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),cm.check,1,2)
if sg:GetCount()>0 then
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment