Commit 2b325325 authored by 未闻皂名's avatar 未闻皂名

2024/9/18 新增白骨、古代机械新卡

parent b1062aa4
Pipeline #29843 passed with stages
in 8 minutes and 27 seconds
No preview for this file type
local m=120109044
local cm=_G["c"..m]
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_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
cm.cost=RD.CostSendDeckTopAnyToGrave(aux.Stringid(m,1),1,3,Group.GetCount)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=e:GetLabel()*500
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if c:IsControler(tp) and c:IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then
Duel.BreakEffect()
if Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
...@@ -21,7 +21,7 @@ cm.cost=RD.CostShowHand(cm.costfilter,1,1) ...@@ -21,7 +21,7 @@ cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,3)
return g:IsExists(Card.IsAbleToHand,1,nil) return g:IsExists(Card.IsAbleToHand,1,nil)
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
local m=120271002
local list={120271002}
local cm=_G["c"..m]
cm.name="强欲而谦虚之壶"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Counter
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,aux.FALSE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3)
return g:IsExists(Card.IsAbleToHand,1,nil)
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.GetFieldGroupCount(p,LOCATION_DECK,0)<3 then return end
local sg,g=RD.RevealDeckTopAndSelect(p,3,HINTMSG_ATOHAND,aux.TRUE,1,1)
local tc=sg:GetFirst()
if tc then
if tc:IsAbleToHand() then
RD.SendToHandAndExists(sg,1-p)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
end
Duel.ShuffleDeck(p)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotSpecialSummonEffect(e,aux.Stringid(m,1),nil,tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return not tc:IsCode(list[1])
end
\ No newline at end of file
local m=120271015
local cm=_G["c"..m]
cm.name="古代的机械炮击"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
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:IsRace(RACE_MACHINE) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
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(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
local m=120271056
local list={120120009,120271056}
local cm=_G["c"..m]
cm.name="白骨王"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Atk Up
function cm.filter(c)
return c:IsCode(list[1],list[2])
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000
end
\ No newline at end of file
local m=120271057
local list={120120009,120271056}
local cm=_G["c"..m]
cm.name="白骨男爵"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE,cm.codecon)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES)
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
--Change Code
function cm.codecon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
--Discard Deck
function cm.exfilter(c)
return c:IsCode(list[1],list[2])
end
cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
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
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanDiscardDeck(aux.Stringid(m,1),tp,2,true)
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