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

2023/12/17 新增:人造人新卡

parent 0b775fcc
Pipeline #24424 passed with stages
in 14 minutes and 54 seconds
No preview for this file type
No preview for this file type
......@@ -39,10 +39,20 @@ function cm.initial_effect(c)
end
--Disable
function cm.distg(e,c)
return c:IsType(TYPE_TRAP)
if e:GetHandler():IsHasEffect(120257056) then
return c:IsType(TYPE_TRAP) and c:GetControler()~=e:GetHandlerPlayer()
else
return c:IsType(TYPE_TRAP)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_TRAP) then
local res
if e:GetHandler():IsHasEffect(120257056) then
res=re:IsActiveType(TYPE_TRAP) and re:GetHandlerPlayer()~=e:GetHandlerPlayer()
else
res=re:IsActiveType(TYPE_TRAP)
end
if res then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
local m=120257026
local list={120257056,120257057}
local cm=_G["c"..m]
cm.name="人造人7.7号"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Direct Attack
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:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Direct Attack
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachDirectAttack(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,1,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)
RD.CanSelectAndDoAction(aux.Stringid(m,2),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=120257027
local list={120155000}
local cm=_G["c"..m]
cm.name="人造人-念力归来者"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(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
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
local m=120257028
local list={120155000}
local cm=_G["c"..m]
cm.name="威胁的人造人-念力震慑者"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DESTROY)
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
--Special Summon Procedure
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_TRAP)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLinkCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.exfilter,tp,0,LOCATION_SZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.ConfirmCards(tp,g)
local sg=g:Filter(Card.IsType,nil,TYPE_TRAP)
if sg:GetCount()>0 then
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
local m=120257029
local list={120155000}
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)
--Indes
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
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.filter(c)
return c:IsRace(RACE_MACHINE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsCanAttachEffectIndes(e:GetHandler(),tp,cm.indval)
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.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_GRAVE,0,nil)
if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
RD.AttachAtkDef(e,c,ct*100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
local m=120257056
local cm=_G["c"..m]
cm.name="电脑加速器"
function cm.initial_effect(c)
--Activate
local e1=RD.RegisterEquipEffect(c,nil,nil,cm.target)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetValue(300)
c:RegisterEffect(e2)
--Change Effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(120257056)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e3)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
local m=120257057
local cm=_G["c"..m]
cm.name="魔人扫描器"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW)
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:IsRace(RACE_MACHINE) or c:IsType(TYPE_TRAP)) and c:IsAbleToGrave()
end
function cm.exfilter(c)
return c:IsType(TYPE_TRAP) and c:IsLocation(LOCATION_GRAVE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3
and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>3 end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,4)
local g2=Duel.GetDecktopGroup(1-tp,4)
local g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
if g3:GetCount()<8 then return end
Duel.ConfirmDecktop(tp,4)
Duel.ConfirmDecktop(1-tp,4)
local mg=g3:Filter(cm.filter,nil)
local draw=false
if mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=mg:Select(tp,1,2,nil)
Duel.DisableShuffleCheck()
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
if RD.IsOperatedGroupExists(cm.exfilter,1,nil) then draw=true end
g1:Sub(sg)
g2:Sub(sg)
end
end
Duel.SortDecktop(tp,tp,g1:GetCount())
RD.SendDeckTopToBottom(tp,g1:GetCount())
Duel.SortDecktop(1-tp,1-tp,g2:GetCount())
RD.SendDeckTopToBottom(1-tp,g2:GetCount())
if draw then
Duel.Draw(tp,1,REASON_EFFECT)
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