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

2023/7/23 新增:接合科技新卡

parent 332f8969
Pipeline #22759 passed with stages
in 6 minutes and 45 seconds
No preview for this file type
local m=120249002
local list={120249006,120249007,120208019}
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,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2],list[3]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>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_DEFENSE)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),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 re:IsActiveType(TYPE_MONSTER) and not tc:IsRace(RACE_MACHINE)
end
\ No newline at end of file
local m=120249003
local cm=_G["c"..m]
cm.name="巨型接合科技·要塞霸王龙[L]"
function cm.initial_effect(c)
--Multiple Attack
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)
--MaximumMode
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_XMATERIAL)
e2:SetLabel(m)
e2:SetTarget(cm.target)
c:RegisterEffect(e2)
end
cm.toss_coin=true
--Multiple Attack
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local reset=RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END
RD.AttachAtkDef(e,c,-600,0,reset)
local res=Duel.TossCoin(tp,1)
if res==1 then
RD.AttachExtraAttack(e,c,2,aux.Stringid(m,1),reset)
else
RD.AttachExtraAttackMonster(e,c,1,aux.Stringid(m,2),reset)
RD.AttachPierce(e,c,aux.Stringid(m,3),reset)
end
end
end
\ No newline at end of file
local m=120249004
local list={120249003,120249005}
local cm=_G["c"..m]
cm.name="巨型接合科技·要塞霸王龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,3000,list[1],list[2])
--Level Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(6)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.indcon)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
end
--Indes
function cm.filter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_MACHINE)
end
function cm.indcon(e)
return RD.MaximumMode(e) and Duel.IsExistingMatchingCard(cm.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
\ No newline at end of file
local m=120249005
local cm=_G["c"..m]
cm.name="巨型接合科技·要塞霸王龙[R]"
function cm.initial_effect(c)
--To Deck (Normal)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--To Deck (MaximumMode)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_XMATERIAL)
e2:SetLabel(m)
c:RegisterEffect(e2)
end
--To Deck
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.exfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsLevelAbove(1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,3,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,6,PLAYER_ALL,LOCATION_GRAVE)
if RD.IsMaximumMode(e:GetHandler()) then
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,3,nil)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,3,nil)) then return end
local c=e:GetHandler()
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,3,3,nil,function(g)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),1-tp,0,LOCATION_GRAVE,3,3,nil,function(sg)
g:Merge(sg)
if RD.SendToDeckAndExists(g) and c:IsFaceup() and c:IsRelateToEffect(e) and RD.IsMaximumMode(c) then
local og=Duel.GetOperatedGroup():Filter(cm.exfilter,nil)
local atk=og:GetSum(Card.GetLevel)*100
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end
end)
end)
end
\ No newline at end of file
local m=120249006
local list={120196050,120231070,120249007}
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 (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end
function cm.thfilter(c)
return (c:IsCode(list[1]) or c:IsLinkCode(list[2])) and c:IsAbleToHand()
end
function cm.spfilter(c,e,tp)
return c:IsCode(list[3]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendMatchToGrave(cm.costfilter,LOCATION_HAND+LOCATION_MZONE,1,1,false,false,false)
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.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
end)
end
\ No newline at end of file
local m=120249007
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)
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
--Destroy
function cm.costfilter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsRace(RACE_MACHINE) and c:IsAbleToHandAsCost()
end
cm.cost=RD.CostSendMZoneToHand(cm.costfilter,1,1,true)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),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 re:IsActiveType(TYPE_MONSTER) and not tc:IsRace(RACE_MACHINE)
end
\ No newline at end of file
...@@ -14,18 +14,19 @@ function cm.initial_effect(c) ...@@ -14,18 +14,19 @@ function cm.initial_effect(c)
end end
--Atk Up --Atk Up
function cm.costfilter(c) function cm.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAbleToDeckOrExtraAsCost() if c:IsLocation(LOCATION_HAND) then
return c:IsAbleToDeckAsCost()
else
return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAbleToDeckOrExtraAsCost()
end
end
function cm.costcheck(g)
return g:FilterCount(Card.IsLocation,1,nil,LOCATION_HAND)==1
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_REPTILE) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelAbove(7) and c:IsRace(RACE_REPTILE) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost1=RD.CostSendMZoneToDeck(cm.costfilter,2,2,true) cm.cost=RD.CostSendGroupToDeckSort(cm.costfilter,cm.costcheck,LOCATION_HAND+LOCATION_MZONE,3,3,true,SEQ_DECKSHUFFLE,true,false)
cm.cost2=RD.CostSendHandToDeck(Card.IsAbleToDeckAsCost,1,1,false)
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.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
local m=120249044
local list={120249006,120249007}
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])
--Atk Down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
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
--Atk Down
cm.cost=RD.CostSendDeckTopToGrave(1)
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)
local val=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*700
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if val==0 or g:GetCount()==0 then return end
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-val,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
Duel.BreakEffect()
Duel.Recover(tp,val,REASON_EFFECT)
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