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

2023/5/16 新增:幻龙新卡

parent e3720d6c
Pipeline #21698 passed with stages
in 6 minutes and 32 seconds
No preview for this file type
local m=120247038
local list={120247040,120247043}
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])
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.filter(c,tp)
if c:IsControler(tp) then
return c:IsFaceup()
else
return true
end
end
function cm.exfilter(c,tp)
return RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.check(g,tp)
return g:FilterCount(Card.IsControler,nil,tp)==1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_MZONE,nil,tp)
if chk==0 then return g:CheckSubGroup(cm.check,2,3,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,tp)
local check=RD.Check(cm.check,tp)
RD.SelectGroupAndDoAction(HINTMSG_DESTROY,filter,check,tp,LOCATION_ONFIELD,LOCATION_MZONE,2,3,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.exfilter,nil,1-tp)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
end)
end
\ No newline at end of file
local m=120247039
local list={120247046,120247043,120196050}
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])
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
function cm.thfilter(c)
return ((c:IsLevelAbove(8) and c:IsRace(RACE_WYRM)) or c:IsCode(list[3])) 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:IsRace(RACE_WYRM) and tc2:IsCode(list[3]))
or (tc2:IsRace(RACE_WYRM) and tc1:IsCode(list[3]))
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.SelectGroupAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),cm.check,tp,LOCATION_GRAVE,0,1,2,nil,function(g)
if RD.SendToHandAndExists(g,1-tp) then
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,LOCATION_ONFIELD,0,1,1,nil,function(sg)
Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end)
end
\ No newline at end of file
local m=120247040
local cm=_G["c"..m]
cm.name="幻坏龙 爆破巨龙"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
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
--Destroy
function cm.costfilter(c)
return c:IsRace(RACE_WYRM)
end
function cm.check(g,e,tp)
return g:IsExists(cm.costfilter,1,nil)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0
end
cm.cost=RD.CostSendHandSubToGrave(Card.IsAbleToGraveAsCost,cm.check,2,2)
function cm.target(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.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
end
end
\ No newline at end of file
local m=120247041
local list={120247043}
local cm=_G["c"..m]
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.exfilter(c)
return c:IsRace(RACE_WYRM) and c:IsLocation(LOCATION_GRAVE)
end
function cm.thfilter(c)
return (c:IsCode(list[1]) or (c:IsLevel(8) and c:IsRace(RACE_WYRM))) and c:IsAbleToHand()
end
cm.cost=RD.CostPayLP(500)
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,cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
end
end
\ No newline at end of file
local m=120247043
local list={120196050}
local cm=_G["c"..m]
cm.name="幻坏兵 安全帽工"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(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
--To Hand
function cm.costfilter(c)
return not c:IsCode(list[1]) and c:IsAbleToGrave()
end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.exfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
cm.cost1=RD.CostSendHandToGrave(cm.costfilter,1,1)
cm.cost2=RD.CostPayLP(500)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk) and cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) end
cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
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,1,1,nil,function(g)
if RD.SendToHandAndExists(g,1-tp) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.exfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
end
\ No newline at end of file
local m=120247052
local cm=_G["c"..m]
cm.name="幻坏大铠户"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Indes Battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(cm.indcon1)
e1:SetValue(1)
c:RegisterEffect(e1)
--Indes Effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetCondition(cm.indcon2)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.indcon3)
e3:SetValue(cm.indval)
c:RegisterEffect(e3)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsRace(RACE_WYRM)
end
--Indes
function cm.indcon1(e)
local tc=e:GetHandler():GetEquipTarget()
return tc and tc:IsAttackPos()
end
function cm.indcon2(e)
return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0
end
function cm.indcon3(e)
return e:GetHandler():GetEquipTarget() and cm.indcon2(e)
end
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
\ No newline at end of file
local m=120247053
local list={120247043}
local cm=_G["c"..m]
cm.name="幻坏调查"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--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:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM)
end
function cm.thfilter(c)
return (c:IsCode(list[1]) or c:IsType(TYPE_FIELD)) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
RD.TargetDiscardDeck(tp,ct)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if RD.DiscardDeck(nil,ct)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
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