Commit 3e9f6af9 authored by 未闻皂名's avatar 未闻皂名

2025/5/21 融合相关效果修改

parent 09228114
Pipeline #36610 passed with stages
in 13 minutes and 7 seconds
......@@ -566,6 +566,16 @@ function RushDuel.CanDiscardDeck(desc, player, count, break_effect)
end
return 0
end
-- 可选操作: 回复
function RushDuel.CanRecover(desc, player, recover, break_effect)
if recover > 0 and Duel.SelectYesNo(player, desc) then
if break_effect then
Duel.BreakEffect()
end
return Duel.Recover(player, recover, REASON_EFFECT)
end
return 0
end
-- 可选操作: 伤害
function RushDuel.CanDamage(desc, player, damage, break_effect)
if damage > 0 and Duel.SelectYesNo(player, desc) then
......
......@@ -20,6 +20,7 @@ EFFECT_PLAYER_RACE_CANNOT_ATTACK = 120155055 -- 幻刃封锁 (不能选择不能
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP = 120247013 -- 三角神迷火花 (整个回合不能发动陷阱)
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP_BATTLE = 120261022 -- 暗物质人偶·水母 (战斗阶段不能发动陷阱)
EFFECT_ATTACK_NOT_CHAIN_TRAP = 120140004 -- 不许始末战士 (攻击宣言时, 对方不能把陷阱卡发动)
EFFECT_DOUBLE_FUSION_MATERIAL = 120252004 -- 青眼幻像龙 (作为2只数量的融合术素材)
EFFECT_ONLY_FUSION_SUMMON = 120263031 -- 只能融合召唤 (奇迹融合)
EFFECT_MAXIMUM_MODE = 120272058 -- 通过效果变成极大模式 (时间机器)
EFFECT_CANNOT_TO_HAND_EFFECT = 120274001 -- 不会因效果回到手卡
......
......@@ -79,6 +79,24 @@ function RushDuel.IsHasContinuousEffect(card)
end
return has_effect
end
-- 条件: 当前的融合效果的卡片编号
function RushDuel.IsFusionEffectCode(code)
if RD.CurrentFusionEffect then
return RD.CurrentFusionEffect:GetHandler():IsCode(code)
end
return false
end
-- 条件: 是否可以作为2只数量的融合术素材
function RushDuel.IsCanBeDoubleFusionMaterial(card, code)
local effects = {card:IsHasEffect(EFFECT_DOUBLE_FUSION_MATERIAL)}
for i, effect in ipairs(effects) do
local value = effect:GetValue()
if value == code then
return true
end
end
return false
end
-- 条件: 位置变化前的控制者
function RushDuel.IsPreviousControler(card, player)
......
......@@ -31,9 +31,8 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,1,nil,function(g)
if RD.SendToDeckAndExists(g,e,tp,REASON_EFFECT)
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Recover(tp,500,REASON_EFFECT)
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanRecover(aux.Stringid(m,1),tp,500)
end
end)
end
\ No newline at end of file
......@@ -35,8 +35,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
RD.TargetDraw(tp,d)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Recover(tp,900,REASON_EFFECT)
if RD.Draw()~=0 then
RD.CanRecover(aux.Stringid(m,1),tp,900,true)
end
end
\ No newline at end of file
......@@ -22,9 +22,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,-800,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
RD.CanRecover(aux.Stringid(m,1),tp,800,true)
end
end
\ No newline at end of file
......@@ -35,9 +35,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Recover(tp,1000,REASON_EFFECT)
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanRecover(aux.Stringid(m,1),tp,1000)
end
end
end)
......
......@@ -29,12 +29,12 @@ function cm.filter(c,tp)
end
end
function cm.check(g)
return g:GetClassCount(Card.GetControler)==#g
return g:GetClassCount(Card.GetControler)==2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
if chk==0 then return g:CheckSubGroup(cm.check,2,2,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,tp)
......
......@@ -3,7 +3,7 @@ cm.name="力量结合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
......
local cm,m=GetID()
cm.name="超可爱执行者·光天女"
function cm.initial_effect(c)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
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.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--To Deck
function cm.filter(c,tp)
if c:IsControler(tp) then
return c:IsFaceup() and c:IsLevel(6) and c:IsAbleToDeck()
else
return c:IsFaceup() and c:IsLevel(7,8) and c:IsAbleToDeck()
end
end
function cm.check(g)
return g:GetClassCount(Card.GetControler)==#g
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
if chk==0 then return g:CheckSubGroup(cm.check,2,2,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)
RD.SelectGroupAndDoAction(HINTMSG_TODECK,filter,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g)
RD.SendToDeckAndExists(g,e,tp,REASON_EFFECT)
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.atktg(e,c)
return c:IsLevelAbove(7)
end
\ No newline at end of file
RD.AlternateCard(120231031)
\ No newline at end of file
......@@ -13,7 +13,7 @@ function cm.matfilter(c,fc,sub)
return c:IsFusionCode(list[1]) or (sub and c:CheckFusionSubstitute(fc))
end
function cm.exfilter(c)
return c:IsHasEffect(120252004)
return RD.IsCanBeDoubleFusionMaterial(c,120252001)
end
function cm.check(g,tp,fc,chkf)
return g:GetCount()==3 or g:IsExists(cm.exfilter,1,nil)
......
local cm,m=GetID()
local list={120120000}
local list={120120000,120252001}
cm.name="青眼幻像龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
......@@ -39,9 +39,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(m)
e1:SetCode(EFFECT_DOUBLE_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(list[2])
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
......
......@@ -36,7 +36,7 @@ function cm.matfilter(c,fc,sub)
return c:IsFusionCode(list[1]) or (sub and c:CheckFusionSubstitute(fc))
end
function cm.exfilter(c)
return c:IsHasEffect(120272011)
return RD.IsCanBeDoubleFusionMaterial(c,120260007)
end
function cm.check(g,tp,fc,chkf)
return g:GetCount()==3 or g:IsExists(cm.exfilter,1,nil)
......
......@@ -40,8 +40,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if a and b and a:IsRelateToBattle() and b:IsRelateToBattle()
and a:IsFaceup() and b:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
and a:IsFaceup() and b:IsFaceup() then
local rec=math.abs(a:GetAttack()-b:GetAttack())*2
Duel.Recover(tp,rec,REASON_EFFECT)
RD.CanRecover(aux.Stringid(m,1),tp,rec)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120260009}
local list={120260009,120260007}
cm.name="全息宇宙世界树龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
......@@ -29,9 +29,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(m)
e1:SetCode(EFFECT_DOUBLE_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(list[2])
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
......
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end
--To Deck
function cm.check(g)
return g:GetClassCount(Card.GetControler)==g:GetCount()
return g:GetClassCount(Card.GetControler)==2
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler()) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
......
......@@ -43,6 +43,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.fucon(e)
local fe=RD.CurrentFusionEffect
return fe and fe:GetHandler():IsCode(list[1])
return RD.IsFusionEffectCode(list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023,120285039}
cm.name="金属蛋球机器人"
function cm.initial_effect(c)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
--Extra Material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_FUSION_MATERIAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(list[2])
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1,RD.EnableChangeCode(c,list[1],LOCATION_MZONE))
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
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:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
cm.trival=RD.ValueDoubleTributeAttrRace(ATTRIBUTE_EARTH,RACE_MACHINE)
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
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)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023,120285053}
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_SEARCH+CATEGORY_TOHAND)
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.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
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 e:IsCostChecked() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<6 then return end
local sg,g=RD.RevealDeckTopAndCanSelect(tp,6,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.thfilter,1,2)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
RD.SendToHandAndExists(sg,e,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
cm.name="蛋王机器人"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
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
--Change Code
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1])
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,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.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil,function(g)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
cm.name="蛋球坦克Mk-II"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--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: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:IsFaceup() and c:IsCode(list[1]) and c:IsAbleToGraveAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,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,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg)
Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120225001,120213023}
cm.name="蛋球机器击速龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Atk Up
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)
end
--Atk Up
function cm.exfilter(c)
return c:IsCode(list[2])
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.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local dam=Duel.GetMatchingGroupCount(cm.exfilter,tp,LOCATION_GRAVE,0,nil)*300
if dam>0 then
RD.CanDamage(aux.Stringid(m,1),tp,dam,true)
end
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
cm.name="蛋球机器王巨人"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedureSP(c,cm.matfilter,cm.check,2,3)
RD.SetFusionMaterial(c,{list[1]},3,3)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(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
--Fusion Material
function cm.matfilter(c,fc,sub)
return c:IsFusionCode(list[1]) or (sub and c:CheckFusionSubstitute(fc))
end
function cm.exfilter(c)
return RD.IsCanBeDoubleFusionMaterial(c,120285039)
end
function cm.check(g,tp,fc,chkf)
return g:GetCount()==3 or g:IsExists(cm.exfilter,1,nil)
end
--Indes
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.costfilter(c)
return c:IsCode(list[1]) and c:IsAbleToDeckOrExtraAsCost()
end
cm.cost=RD.CostSendGraveToDeckTop(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),nil,tp,LOCATION_MZONE,0,1,1,nil,function(g)
g:ForEach(function(tc)
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end)
local c=e:GetHandler()
if Duel.Destroy(g,REASON_EFFECT)~=0
and c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
RD.CanRecover(aux.Stringid(m,3),tp,2000,true)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
cm.name="强击蛋球弹射"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
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,tp)
if c:IsControler(tp) then
return c:IsFaceup() and c:IsCode(list[1])
else
return c:IsFaceup() and c:IsAttackAbove(100)
end
end
function cm.check(g)
return g:GetClassCount(Card.GetControler)==2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
if chk==0 then return g:CheckSubGroup(cm.check,2,2,tp) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,tp)
RD.SelectGroupAndDoAction(aux.Stringid(m,1),filter,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g)
local tc1=g:Filter(Card.IsControler,nil,tp):GetFirst()
local tc2=g:Filter(Card.IsControler,nil,1-tp):GetFirst()
RD.AttachAtkDef(e,tc1,tc2:GetAttack(),0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachPierce(e,tc1,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="蛋球枪兵"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return c:IsLevel(1) and c:IsAttack(200) and RD.IsDefense(c,0)
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false,nil,nil,function(g)
return g:FilterCount(cm.exfilter,nil)
end)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 and e:GetLabel()==1 then
RD.CanDraw(aux.Stringid(m,1),tp,1)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120222017,120225001}
cm.name="蛋球结合"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
--Event
if not cm.global_effect then
cm.global_effect=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_ADD_FUSION_CODE)
ge1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
ge1:SetTarget(cm.codetg)
ge1:SetValue(list[1])
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetValue(list[2])
Duel.RegisterEffect(ge2,0)
end
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function cm.matfilter(c)
return c:IsFaceup() and c:IsOnField()
end
function cm.spfilter(c)
return c:IsRace(RACE_DRAGON+RACE_MACHINE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
RD.AttachAtkDef(e,fc,200,RESET_EVENT+RESETS_STANDARD,true)
end
-- Extra
function cm.codetg(e,c)
-- 临时解决办法: 使用"蛋球结合"时,赋予额外的融合卡号
return RD.IsFusionEffectCode(120285053)
and c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
local cm,m=GetID()
local list={120213023}
cm.name="蛋球蛋球苏生"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c,tp,rp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget())
end
function cm.filter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,tp,rp)
end
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.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,3,nil,e,POS_FACEUP,true)
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