Commit 46be7770 authored by root's avatar root

Refresh on 2025-05-29 20:47:55

parent 24b3f0ea
......@@ -2623,7 +2623,6 @@
03040496 0 --混沌魔龙
55320758 0 --天上天下百鬼罗刹
99153051 0 --蕾祸之首
69164989 0 --六花绚烂
46640168 0 --落泪之日
02463794 0 --镇魂棺
114514003 0 --平衡镇魂棺
......@@ -2648,7 +2647,6 @@
30342076 0 --开箭头解码
97051536 0 --狱火机 邪恶
09396662 0 --冰洁界的镜魔
53286626 0 --圣蔓的播种
91300233 0 --虫龙星
21056275 0 --武装蜂起
68989420 0 --科技属龙骑士
......@@ -2692,7 +2690,6 @@
36436372 0 --机关傀儡 小士兵队
42544773 0 --封印之魔导士 斯彭
89812483 0 --金属化强化反射装甲
92501449 0 --原石鸣狞
56506740 0 --原石皇脉
76375976 0 --魔鍾洞
35844557 0 --雷火剑
......@@ -2724,8 +2721,7 @@
32061192 0 --码丽丝睡鼠
96676583 0 --码丽丝柴郡猫
27420823 0 --K9R5撕裂者
92248362 0 --K917号饭纲
55031170 0 --k966b号灯鬼
91025875 0 --K900
93192592 0 --味美奖品棒棒糖
06153210 0 --计都星辰
32548318 0 --罗睺星辰
......@@ -2733,17 +2729,35 @@
114514030 0 --平衡奖品棒棒糖
31603289 0 --味美奖品蛋糕杯
69299029 0 --王家神宝替神殿
20357457 0 --未来之柱
52340444 0 --閃刀機-ホーネットビット
91438674 0 --阿尔戈Adela
101301031 0 --月华香检索
101301002 0 --我我我加把劲骑士
101301004 0 --怒怒怒怒战士
101301042 0 --船新未来皇
101301029 0 --愤怒饥饿的汉堡
101301023 0 --新式魔厨的船新料理长
101301069 0 --闪刀新卡回收收
100200271 0 --试作闪刀姬
81196066 0 --月华香检索
09491461 0 --我我我加把劲骑士
62880279 0 --怒怒怒怒战士
41522092 0 --船新未来皇
29251488 0 --新式魔厨的船新料理长
34433770 0 --闪刀新卡回收收
76072561 0 --光闪刀
82570174 0 --双叉戟龙君王
42097666 0 --青眼精灵
80326401 0 --青眼祈祷
80181649 0 --k9案件
41924516 0 --白森森狼
44478599 0 --圣天大树
71002019 0 --六花叶牡丹
39931513 0 --天杯白龙
51831560 0 --宝石骑士拿非琉
74733322 0 --神艺学园
01122030 0 --神艺永续
97434754 0 --神艺粉发
35550352 0 --征服斗魂场地
02344618 0 --月光永续
01047075 0 --斗炎之剑士
08841431 0 --百夫长8
16528181 0 --王之棺
15005145 0 --百夫长检索下级
92133240 0 --恐啡肽检索下级
08633261 0 --雷火内燃
#limit
76794549 1 --アストログラフ・マジシャン
74586817 1 --PSYフレームロード・Ω
......@@ -2787,12 +2801,6 @@
23002292 1 --レッド・リブート
48905153 1 --十二獣 龙枪
38814750 1 --PSYフレームギア・γ
91810826 1 --天杯红中
39931513 1 --天杯白龙
84941194 1 --荷鲁斯荣光
16528181 1 --王之棺
34909328 1 --雷火导导爆
41371602 1 --起立吧,百夫长骑士
25592142 1 --白森林的阿斯忒瑞亚
92714517 1 --大欢迎
26523337 1 --魊影塞克斯
......@@ -2817,22 +2825,17 @@
18239909 1 --爆龙剑士
38356857 1 --冷酷遗式术士
38572779 1 --幻创之混种恐龙
26984177 1 --王墓的石壁
81522098 1 --拟箱龙
86809440 1 --拟箱场地
35261759 1 --强欲而贪欲之壶
24220368 1 --宝石骑士色散
51831560 1 --宝石骑士拿非琉
08633261 1 --雷火内燃
96540807 1 --再世战神弹弹怪
22938501 1 --再世导神康康炸
59323650 1 --再世龙神除除后
30581601 1 --点心抓取味美喵
60764609 1 --刻魔铁匠
101301008 1 --神艺主角
101301054 1 --神艺学园
101301057 1 --神艺主角检索
101301058 1 --神艺学园检索
52340444 1--閃刀機-ホーネットビット
30243636 1 --愤怒and饥饿的汉堡
#semi limit
57103969 2 --炎舞-「天璣」
98338152 2 --閃刀機-ウィドウアンカー
......@@ -2841,12 +2844,8 @@
24224830 2 --墓穴の指名者
87209160 2 --铁兽弗拉克杜尔
24878656 2 --玩具箱
56465181 2 --龙相剑现
56465981 2 --龙相剑现
78080961 2 --SPYRAL-ジーニアス
70711847 2 --未界域的尼斯水怪
78420796 2 --恐啡肽狂龙激昂
26631975 2 --恐啡肽狂龙领域
63526052 2 --机怪虫胞体虫
67723438 2 --緊急テレポート
26400609 2 --瀑征竜-タイダル
17548456 2 --陨石兽
......
......@@ -10,7 +10,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
......@@ -20,6 +20,7 @@ function s.initial_effect(c)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(s.spcon2)
c:RegisterEffect(e2)
......
......@@ -47,6 +47,9 @@ function c114514921.initial_effect(c)
local e6=e5:Clone()
e6:SetCode(EVENT_REMOVE)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e7)
end
function c114514921.thfilter(c)
return ((c:IsType(TYPE_SPELL) and c:IsSetCard(0x46)) or c:IsCode(37630732) or c:IsCode(63995093) or c:IsCode(23171610) or c:IsCode(52875873) or c:IsCode(81193865) or c:IsCode(78217065)) and c:IsAbleToHand()
......
......@@ -13,6 +13,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.filter(c,e,tp)
......
--プロキシー・F・マジシャン
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--fusion
local e1=FusionSpell.CreateSummonEffect(c,nil,nil,LOCATION_ONFIELD)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cfilter(c,g)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION) and g:IsContains(c)
end
function s.spfilter(c,e,tp)
return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(s.cfilter,1,nil,lg) and not eg:IsContains(e:GetHandler())
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -57,6 +57,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(0,LOCATION_SZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetTarget(s.distg)
Duel.RegisterEffect(e1,tp)
end
......@@ -68,7 +69,7 @@ function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.matfilter(c)
return c:IsSetCard(0x1a4) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1)
return c:IsSetCard(0x1a4) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function s.fgoal(sg,e,tp)
return sg:GetSum(Card.GetLevel)==10
......@@ -76,14 +77,14 @@ end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK,0,nil)
return mg:CheckSubGroup(s.fgoal,1,99,e,tp)
return mg:CheckSubGroup(s.fgoal,1,10,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=mg:SelectSubGroup(tp,s.fgoal,false,1,99,e,tp)
local sg=mg:SelectSubGroup(tp,s.fgoal,false,1,10,e,tp)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
......
......@@ -99,7 +99,7 @@ end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function s.setfilter(c)
......
--月光舞踏会
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,24094653)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.reg)
c:RegisterEffect(e1)
--send to GY
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.reg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.tgfilter(c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xdf) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsSummonPlayer(tp)
and c:IsAllTypes(TYPE_FUSION+TYPE_MONSTER)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsCode(24094653) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT+REASON_DISCARD)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=sg:Select(tp,1,1,nil)
Duel.ShuffleHand(tp)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
--Once this turn, if you Fusion Summon a "Lunalight" monster, you can also banish monsters from your grave as material
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
e1:SetCountLimit(1)
e1:SetTargetRange(LOCATION_GRAVE,0)
e1:SetTarget(function(_,c) return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) end)
e1:SetOperation(function() return FusionSpell.FUSION_OPERATION_BANISH end)
e1:SetValue(function(fusion_effect,c) return c and c:IsSetCard(0xdf) and c:IsControler(fusion_effect:GetHandlerPlayer()) end)
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
-- --月光舞踏会
-- local s,id=GetID()
-- function s.initial_effect(c)
-- --Activate
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_ACTIVATE)
-- e1:SetCode(EVENT_FREE_CHAIN)
-- c:RegisterEffect(e1)
-- --fake one, activate to get extra materials
-- local e2=Effect.CreateEffect(c)
-- e2:SetDescription(aux.Stringid(id,0))
-- e2:SetType(EFFECT_TYPE_IGNITION)
-- e2:SetRange(LOCATION_SZONE)
-- e2:SetOperation(s.op)
-- c:RegisterEffect(e2)
-- end
-- function s.op(e,tp,eg,ep,ev,re,r,rp)
-- --Once this turn, if you Fusion Summon a "Lunalight" monster, you can also banish monsters from your grave as material
-- local c=e:GetHandler()
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_FIELD)
-- e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
-- e1:SetCountLimit(1)
-- e1:SetTargetRange(LOCATION_GRAVE,0)
-- e1:SetTarget(function(e,c) return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) end)
-- e1:SetOperation(function() return FusionSpell.FUSION_OPERATION_BANISH end)
-- e1:SetValue(function(e,c) return c and c:IsSetCard(0xdf) and c:IsControler(e:GetHandlerPlayer()) end)
-- e1:SetReset(RESET_PHASE|PHASE_END)
-- Duel.RegisterEffect(e1,tp)
-- end
--融合
local s,id,o=GetID()
function s.initial_effect(c)
FusionSpell.RegisterSummonEffect(c)
end
--パワー・ボンド
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
FusionSpell.RegisterSummonEffect(c,s.fusfilter,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.stage_x_operation)
end
---@param c Card
function s.fusfilter(c)
return c:IsRace(RACE_MACHINE)
end
---@type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
function s.stage_x_operation(e,tc,tp,stage,mg_fuison_spell,mg_all)
--- register if the summon is finished
if stage==FusionSpell.STAGE_AT_SUMMON_OPERATION_FINISH then
-- if base ATK is 0, do nothing
local atk=tc:GetBaseAttack()
if atk<=0 then
return
end
---increase ATK
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--- do damage on end phase
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(tc:GetBaseAttack())
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetOperation(s.damop)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,e:GetLabel(),REASON_EFFECT)
end
\ No newline at end of file
--サイバー・ダーク・キメラ
local s,id,o=GetID()
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.costfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function s.thfilter(c)
return c:IsCode(37630732) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
-- Can only use Dragon or Machine "Cyber" monsters as Fusion Material this turn
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(s.limittg)
e1:SetValue(s.fuslimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--Can also banish monsters from your GY as material once when you Fusion Summon this turn
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
e2:SetTargetRange(LOCATION_GRAVE,0)
e2:SetCountLimit(1)
e2:SetTarget(s.mttg)
e2:SetOperation(function() return FusionSpell.FUSION_OPERATION_BANISH end)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function s.limittg(e,c)
return not (c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93))
end
function s.fuslimit(e,c,sumtype)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end
function s.mttg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.tgfilter(c,tp)
return c:IsSetCard(0x4093) and c:IsType(TYPE_MONSTER)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--月光融合
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=FusionSpell.CreateSummonEffect(c,s.fusfilter,nil,s.pre_select_mat_location,nil,nil,nil,s.fcheck,s.gcheck)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
---@param c Card
function s.fusfilter(c)
return c:IsSetCard(0xdf)
end
---@type FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
function s.pre_select_mat_location(tc,tp)
local res=LOCATION_HAND|LOCATION_ONFIELD
if Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil) then
res=res|LOCATION_DECK|LOCATION_EXTRA
end
return res
end
function s.cfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA)
end
function s.fcheck(tp,mg,fc,all_mg)
---@type Group
local extra_mg=mg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if #extra_mg==0 then
return true
end
--- by fusion spell, the material from deck/extra can only be at most 1
if #extra_mg>1 then
return false
end
--- by fusion spell, the material from deck/extra must be Lunalight monster
if extra_mg:FilterCount(Card.IsSetCard,nil,0xdf)~=#extra_mg then
return false
end
return true
end
function s.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end
......@@ -1982,3 +1982,449 @@ function Auxiliary.MonsterEffectPropertyFilter(flag)
return e:IsHasProperty(flag) and not e:IsHasRange(LOCATION_PZONE)
end
end
FusionSpell = {}
---@alias FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION fun(tc:Card,tp:integer):integer
---@alias FUSION_FCHECK_FUNCTION fun(tp:integer,mg:Group,fc:Card,all_mg:Group):boolean
--- Add LOCATION_EXTRA to EFFECT_EXTRA_FUSION_MATERIAL list, remove once core updated
function FusionSpell.GetFusionMaterial(tp,locations)
local res=Duel.GetFusionMaterial(tp,locations)
local g=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_EXTRA,0,nil,EFFECT_EXTRA_FUSION_MATERIAL)
if #g>0 then
res:Merge(g)
end
return res
end
---@param c Card card that uses the effect
---@param fusfilter (fun(c:Card):boolean)? filter for the monster to be Fusion Summoned
---@param matfilter (fun(c:Card):boolean)? filter for the materials, use it only under very strong limitation like D-Fusion.
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION? location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[]? operation code to do for the materials, it will be check in order (default [{ LOCATION_GRAVE: FUSION_OPERATION_BANISH}, { 0xff: FUSION_OPERATION_GRAVE}])
---@param post_select_mat_location integer? location where to find the materials after known the materials (default nil)
---@param post_select_mat_check function? function to check whether we can enable the extra locations
---@param additional_fcheck function? function to check the final material group fits the requirement
---@param additional_gcheck function? function to check the part of potiential material group fits the requirement to improve performance
---@param fuslocation integer? location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param sumtype integer? summon type (default SUMMON_TYPE_FUSION)
---@param sumpos integer? summon position (default POS_FACEUP)
function FusionSpell.RegisterSummonEffect(c,fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos)
local e1=FusionSpell.CreateSummonEffect(c,fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos)
Card.RegisterEffect(c,e1)
return e1
end
---@param c Card card that uses the effect
---@param fusfilter (fun(c:Card):boolean)? filter for the monster to be Fusion Summoned
---@param matfilter (fun(c:Card):boolean)? filter for the materials, use it only under very strong limitation like D-Fusion.
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION? location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_ONFIELD)
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[]? operation code to do for the materials, it will be check in order (default [{ LOCATION_GRAVE: FUSION_OPERATION_BANISH}, { 0xff: FUSION_OPERATION_GRAVE}])
---@param post_select_mat_location integer? location where to find the materials after known the materials (default nil)
---@param post_select_mat_check function? function to check whether we can enable the extra locations
---@param additional_fcheck function? function to check the final material group fits the requirement
---@param additional_gcheck function? function to check the part of potiential material group fits the requirement to improve performance
---@param fuslocation integer? location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param sumtype integer? summon type (default SUMMON_TYPE_FUSION)
---@param sumpos integer? summon position (default POS_FACEUP)
function FusionSpell.CreateSummonEffect(c,fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos)
matfilter=matfilter or aux.TRUE
pre_select_mat_location=pre_select_mat_location or LOCATION_HAND|LOCATION_ONFIELD
mat_operation_code_map=mat_operation_code_map or {}
-- add last fallback, banish grave, grave others
table.insert(mat_operation_code_map,{[LOCATION_GRAVE]=FusionSpell.FUSION_OPERATION_BANISH})
table.insert(mat_operation_code_map,{[0xff]=FusionSpell.FUSION_OPERATION_GRAVE})
fuslocation=fuslocation or LOCATION_EXTRA
sumtype=sumtype or SUMMON_TYPE_FUSION
sumpos=sumpos or POS_FACEUP
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(FusionSpell.GetSummonTarget(fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos))
e1:SetOperation(FusionSpell.GetSummonOperation(fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos))
return e1
end
---@param fusfilter fun(c:Card):boolean? filter for the monster to be Fusion Summoned
---@param matfilter fun(c:Card):boolean? filter for the materials, use it only under very strong limitation like D-Fusion.
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION? location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[]? operation code to do for the materials, it will be check in order (default [{ LOCATION_GRAVE: FUSION_OPERATION_BANISH}, { 0xff: FUSION_OPERATION_GRAVE}])
---@param post_select_mat_location integer? location where to find the materials after known the materials (default nil)
---@param post_select_mat_check function? function to check whether we can enable the extra locations
---@param additional_fcheck function? function to check the final material group fits the requirement
---@param additional_gcheck function? function to check the part of potiential material group fits the requirement to improve performance
---@param fuslocation integer? location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param sumtype integer? summon type (default SUMMON_TYPE_FUSION)
---@param sumpos integer? summon position (default POS_FACEUP)
function FusionSpell.GetSummonTarget(fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if additional_fcheck~=nil then
aux.FCheckAdditional=FusionSpell.GetFusionSpellFCheckAdditionalFunction(additional_fcheck,tp,c)
end
local sg=Duel.GetMatchingGroup(FusionSpell.SummonTargetFilter,tp,fuslocation,0,nil,fusfilter,e,tp,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,additional_fcheck,sumtype,sumpos)
aux.FCheckAdditional=nil
return #sg>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,fuslocation)
end
end
---@param fusfilter fun(c:Card):boolean filter for the monster to be Fusion Summoned
---@param matfilter fun(c:Card):boolean filter for the materials, use it only under very strong limitation like D-Fusion.
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[] operation code to do for the materials, it will be check in order
---@param post_select_mat_location integer? location where to find the materials after known the materials (default nil)
---@param post_select_mat_check function? function to check whether we can enable the extra locations
---@param additional_fcheck function? function to check the final material group fits the requirement
---@param additional_gcheck function? function to check the part of potiential material group fits the requirement to improve performance
---@param fuslocation integer location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param sumtype integer summon type (default SUMMON_TYPE_FUSION)
---@param sumpos integer summon position (default POS_FACEUP)
function FusionSpell.GetSummonOperation(fusfilter,matfilter,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,post_select_mat_check,additional_fcheck,additional_gcheck,fuslocation,sumtype,sumpos)
return function(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(FusionSpell.SummonTargetFilter,tp,fuslocation,0,nil,fusfilter,e,tp,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,additional_fcheck,sumtype,sumpos)
if #sg>0 then
local tc=nil
local materials=Group.CreateGroup()
while #materials==0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=sg:Select(tp,1,1,nil):GetFirst()
local mg_for_tc=FusionSpell.GetMaterialsGroupForTargetCard(tc,tp,e,pre_select_mat_location,mat_operation_code_map,post_select_mat_location)
if additional_fcheck~=nil then
aux.FCheckAdditional=FusionSpell.GetFusionSpellFCheckAdditionalFunction(additional_fcheck,tp,c)
end
materials=Duel.SelectFusionMaterial(tp,tc,mg_for_tc)
aux.FCheckAdditional=nil
end
assert(tc~=nil)
if #materials>0 then
local all_locations=FusionSpell.GetAllLocationsForTargetCard(tc,tp,pre_select_mat_location,post_select_mat_location)
---@type Effect[]
local applied_extra_effects={}
---@type {[function]:Group}
local material_grouped_by_op={}
--For material that can be material only by 1 effect, either fusion spell or extra material effect, do the operation on it.
--For material that can be material by multiple effect, ask user which to apply.
for material in aux.Next(materials) do
local material_effects=FusionSpell.GetMaterialEffects(material,tc,all_locations,materials)
if material_effects~=nil and #material_effects>0 then
local material_effect=nil
if #material_effects==1 then
material_effect=material_effects[1]
else
-- more than one effect. ask player to choose from one.
material_effect=FusionSpell.MultiMaterialEffectPrompt(material_effects,tp,e)
end
local fusion_operation=nil
if material_effect==true then
local fusion_operation_code=FusionSpell.GetOperationCodeByMaterialLocation(material:GetLocation(),mat_operation_code_map)
fusion_operation=FusionSpell.GetFusionOperationByCode(fusion_operation_code)
else
-- extra material effects
local fusion_operation_code=material_effect:GetOperation()()
fusion_operation=FusionSpell.GetFusionOperationByCode(fusion_operation_code,material:GetLocation(),mat_operation_code_map)
table.insert(applied_extra_effects,material_effect)
end
assert(fusion_operation~=nil)
material_grouped_by_op[fusion_operation]=material_grouped_by_op[fusion_operation] or Group.CreateGroup()
material_grouped_by_op[fusion_operation]:AddCard(material)
else
--else we are in trouble
assert(false,string.format("card %d has no material effect",material:GetCode()))
end
end
-- perform operations on materials
for operation,materials in pairs(material_grouped_by_op) do
operation(materials,tp)
end
-- mark effect as used once. if count limit reached, reset the effect
for _,effect in ipairs(applied_extra_effects) do
effect:UseCountLimit(tp)
if effect:CheckCountLimit(tp)==false then
effect:Reset()
end
end
end
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,sumpos)
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end
end
end
---@param pre_select_mat_location integer|(fun(tc:Card,tp:integer):integer) location where to find the materials before known the materials
---@return integer locations all possible locations of the material
function FusionSpell.GetAllLocationsForTargetCard(tc,tp,pre_select_mat_location,post_select_mat_location)
local all_locations=0
if type(pre_select_mat_location)=="function" then
all_locations=all_locations|pre_select_mat_location(tc,tp)
else
assert(pre_select_mat_location~=nil, "pre_select_mat_location is nil")
all_locations=all_locations|pre_select_mat_location
end
if post_select_mat_location~=nil then
all_locations=all_locations|post_select_mat_location
end
return all_locations
end
---@param pre_select_mat_location integer|function location where to find the materials before known the materials
function FusionSpell.GetMaterialsGroupForTargetCard(tc,tp,e,pre_select_mat_location,mat_operation_code_map,post_select_mat_location)
local all_locations=FusionSpell.GetAllLocationsForTargetCard(tc,tp,pre_select_mat_location,post_select_mat_location)
local mg=FusionSpell.GetFusionMaterial(tp,all_locations)
mg=mg:Filter(function(mc)
--- in order to be qualified for being material, it need to be able to perform the operation.
local can_be_fusion_spell_material=false
if mc:IsLocation(all_locations) then
---@type FUSION_FILTER_FUNCTION
local filter_by_operation=FusionSpell.GetFusionFilterByCode(FusionSpell.GetOperationCodeByMaterialLocation(mc:GetLocation(),mat_operation_code_map))
can_be_fusion_spell_material=filter_by_operation(mc,tp,e)
end
local can_be_extra_material=false
local extra_effect=FusionSpell.GetExtraMaterialEffect(mc,tp,tc)
if extra_effect~=nil then
---@type FUSION_OPERATION_CODE
local operation_code=FusionSpell.FUSION_OPERATION_INHERIT
if extra_effect:GetOperation()~=nil then
operation_code=extra_effect:GetOperation()()
end
operation_code=operation_code or FusionSpell.FUSION_OPERATION_INHERIT
local filter_by_operation=FusionSpell.GetFusionFilterByCode(operation_code,mc:GetLocation(),mat_operation_code_map)
can_be_extra_material=filter_by_operation(mc,tp,e)
end
return can_be_fusion_spell_material or can_be_extra_material
end,tc)
return mg
end
---@param location integer
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[]? operation code to do for the materials, it will be check in order
function FusionSpell.GetOperationCodeByMaterialLocation(location,mat_operation_code_map)
for _,map in ipairs(mat_operation_code_map) do
for key,value in pairs(map) do
if location&key~=0 then
return value
end
end
end
end
---@param fusfilter fun(c:Card,tp:integer):boolean
---@param pre_select_mat_location integer|function location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)
function FusionSpell.SummonTargetFilter(c,fusfilter,e,tp,pre_select_mat_location,mat_operation_code_map,post_select_mat_location,additional_fcheck,sumtype,sumpos)
local mg=FusionSpell.GetMaterialsGroupForTargetCard(c,tp,e,pre_select_mat_location,mat_operation_code_map,post_select_mat_location)
if additional_fcheck~=nil then
aux.FCheckAdditional=FusionSpell.GetFusionSpellFCheckAdditionalFunction(additional_fcheck,tp,c)
end
local res=c:IsType(TYPE_FUSION) and (not fusfilter or fusfilter(c,tp)) and c:IsCanBeSpecialSummoned(e,sumtype,tp,false,false,sumpos) and c:CheckFusionMaterial(mg)
aux.FCheckAdditional=nil
return res
end
-- operation that would be applied on the material
---@alias FUSION_OPERATION_CODE integer
FusionSpell.FUSION_OPERATION_INHERIT=0x10000 -- used only on EFFECT_EXTRA_FUSION_MATERIAL effects, inherits the operation of fusion spell
FusionSpell.FUSION_OPERATION_GRAVE=0x1
FusionSpell.FUSION_OPERATION_BANISH=0x2
FusionSpell.FUSION_OPERATION_BANISH_FACEDOWN=0x3
FusionSpell.FUSION_OPERATION_SHUFFLE=0x4
FusionSpell.FUSION_OPERATION_DECK_BOTTOM=0x5
FusionSpell.FUSION_OPERATION_DESTROY=0x6
---@return FUSION_OPERATION_FUNCTION
function FusionSpell.GetFusionOperationByCode(code,matlocation,fusion_spell_operation_code_map)
if code==FusionSpell.FUSION_OPERATION_GRAVE then
return FusionSpell.GraveMaterial
elseif code==FusionSpell.FUSION_OPERATION_BANISH then
return FusionSpell.BanishMaterial
elseif code==FusionSpell.FUSION_OPERATION_BANISH_FACEDOWN then
return FusionSpell.BanishMaterialFaceDown
elseif code==FusionSpell.FUSION_OPERATION_SHUFFLE then
return FusionSpell.ShuffleMaterial
elseif code==FusionSpell.FUSION_OPERATION_DECK_BOTTOM then
return FusionSpell.SendDeckBottomMaterial
elseif code==FusionSpell.FUSION_OPERATION_DESTROY then
return FusionSpell.DestroyMaterial
elseif code==FusionSpell.FUSION_OPERATION_INHERIT then
if matlocation==nil or fusion_spell_operation_code_map==nil then
-- we are in trouble
assert(false, "we have an material that inhreits, but operation can be inhreited")
return FusionSpell.GraveMaterial
end
return FusionSpell.GetFusionOperationByCode(fusion_spell_operation_code_map[matlocation])
end
end
---@return FUSION_FILTER_FUNCTION
function FusionSpell.GetFusionFilterByCode(code,matlocation,fusion_spell_operation_code_map)
if code==FusionSpell.FUSION_OPERATION_GRAVE then
return FusionSpell.GraveMaterialFilter
elseif code==FusionSpell.FUSION_OPERATION_BANISH then
return FusionSpell.BanishMaterialFilter
elseif code==FusionSpell.FUSION_OPERATION_BANISH_FACEDOWN then
return FusionSpell.BanishMaterialFaceDownFilter
elseif code==FusionSpell.FUSION_OPERATION_SHUFFLE then
return FusionSpell.ShuffleMaterialFilter
elseif code==FusionSpell.FUSION_OPERATION_DECK_BOTTOM then
return FusionSpell.SendDeckBottomMaterialFilter
elseif code==FusionSpell.FUSION_OPERATION_DESTROY then
return FusionSpell.DestroyMaterialFilter
elseif code==FusionSpell.FUSION_OPERATION_INHERIT then
if matlocation==nil or fusion_spell_operation_code_map==nil then
-- we are in trouble
return nil
end
return FusionSpell.GetFusionFilterByCode(fusion_spell_operation_code_map[matlocation])
end
end
---@alias FUSION_OPERATION_FUNCTION fun(sg:Card|Group,tp:integer):integer
---@alias FUSION_FILTER_FUNCTION fun(c:Card,tp:integer?,e:Effect?):boolean
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.DestroyMaterial(sg,tp)
return Duel.Destroy(sg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,nil,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.DestroyMaterialFilter(c,tp,e)
return c:IsDestructable(e)
end
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.GraveMaterial(sg,tp)
return Duel.SendtoGrave(sg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.GraveMaterialFilter(c)
return c:IsAbleToGrave()
end
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.BanishMaterial(sg,tp)
return Duel.Remove(sg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.BanishMaterialFilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.BanishMaterialFaceDown(sg,tp)
return Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.BanishMaterialFaceDownFilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.ShuffleMaterial(sg,tp)
return Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.ShuffleMaterialFilter(c)
return c:IsAbleToDeck()
end
---@type FUSION_OPERATION_FUNCTION
function FusionSpell.SendDeckBottomMaterial(sg,tp)
-- prompt user to select order
return Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION,tp)
end
---@type FUSION_FILTER_FUNCTION
function FusionSpell.SendDeckBottomMaterialFilter(c)
return c:IsAbleToDeck()
end
--Returns a list of effect, if element is the EFFECT_EXTRA_FUSION_MATERIAL, stands for it can be included by that extra material effect.
--if element is true, stands for it can be included by the fusion effect itself.
---@return (true|Effect)[]
function FusionSpell.GetMaterialEffects(c,summon_card,matlocation,materials)
local res={}
if c:IsLocation(matlocation) then
table.insert(res,true)
end
local extra_effs={c:IsHasEffect(EFFECT_EXTRA_FUSION_MATERIAL)}
for _,eff in ipairs(extra_effs) do
if not summon_card then
table.insert(res,eff)
end
local val=eff:GetValue()
if (type(val)=="function" and val(eff,summon_card)) or val==1 then
table.insert(res,eff)
end
end
return res
end
--Returns the 1st EFFECT_EXTRA_FUSION_MATERIAL is applied on Card c.
--If summon_card is provided, it will filter on whether the effect's value function applies to that card.
---@param c Card the material card card
---@param tp integer the player
---@param summon_card Card the target card
function FusionSpell.GetExtraMaterialEffect(c,tp,summon_card)
local effs={c:IsHasEffect(EFFECT_EXTRA_FUSION_MATERIAL)}
for _,eff in ipairs(effs) do
if eff:CheckCountLimit(tp)==true then
if summon_card==nil then
return eff
end
local val=eff:GetValue()
if (type(val)=="function" and val(eff,summon_card)) or val==1 then
return eff
end
end
end
end
-- when a material has multiple effect make it could be material, ask for which to apply.
---@return true|Effect
function FusionSpell.MultiMaterialEffectPrompt(effects,tp,e)
local ops= {}
for i,eff in ipairs(effects) do
if eff==true then
-- this can be used as default material
table.insert(ops,e:GetDescription())
else
table.insert(ops,eff:GetDescription())
end
end
local op=Duel.SelectOption(tp,table.unpack(ops))
return effects[op + 1]
end
--- filter out materials that does not necessary come from fusion spell and pass to the gcheck of fusion spell
--- @param fusion_spell_additional_fcheck_function FUSION_FCHECK_FUNCTION
function FusionSpell.GetFusionSpellFCheckAdditionalFunction(fusion_spell_additional_fcheck_function,tp,tc)
return (function(f_tp,mg,fc)
local extra_mg=mg:Filter(FusionSpell.GetExtraMaterialEffect,nil,tp,tc)
return fusion_spell_additional_fcheck_function(f_tp,mg-extra_mg,fc,sg)
end)
end
......@@ -5216,7 +5216,7 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
坚毅的磁石战士(114514351) 地 4星 岩石 1600 1700 (Custom)
系列:0x2066
①:自己场上有「光之黄金柜」的场合,把手卡·场上的这张卡送去墓地才能发动。选自己1张手卡送去墓地,从卡组把1只这个卡名以外的「磁石战士」怪兽。自己场上有「光之黄金柜」的场合,也能作为代替把1只有「光之黄金柜」的卡名记述的怪兽特殊召唤,那只怪兽的等级上升4星。
①:把手卡·场上的这张卡送去墓地才能发动。选自己1张手卡送去墓地,从卡组把1只这个卡名以外的「磁石战士」怪兽。自己场上有「光之黄金柜」的场合,也能作为代替把1只有「光之黄金柜」的卡名记述的怪兽特殊召唤,那只怪兽的等级上升4星。
②:1回合1次,自己场上有「光之黄金柜」的场合,对方场上的怪兽的效果发动时才能发动。自己场上的有「光之黄金柜」的卡名记述的怪兽直到连锁结束时不受对方发动的怪兽效果的影响。那之后,把对方场上最多有自己场上有「光之黄金柜」的卡名记述的怪兽数量的怪兽送去墓地。
磁石放电(114514352) 通常魔法 (Custom)
......@@ -6228,7 +6228,7 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
系列:0x1093
这个卡名的③的效果1回合只能使用1次。
①:以自己场上1只机械族的「电子」怪兽为对象才能发动。从自己的手卡·墓地把这张卡当作装备卡使用给那只怪兽装备。
②:这张卡被装备中的场合,1回合1次,以场上1张魔法·陷阱卡为对象才能发动。那张卡破坏。
②:这张卡被装备中的场合,1回合1次,以这张卡以外的场上1张魔法·陷阱卡为对象才能发动。那张卡破坏。
③:双方回合,把这张卡装备的怪兽的装备全部送去墓地,把那只怪兽解放才能发动。从卡组把1只机械族「电子」怪兽攻击力变成0无视召唤条件特殊召唤。
分类:光属性、暗属性、机械族、融合、动漫-GX-男二
效果分类:魔陷破坏、怪兽破坏、特殊召唤
......@@ -6480,7 +6480,7 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
狂爱之种(114514536) 暗 1星 恶魔 0 0 (Custom)
这个卡名的①的效果1回合只能使用1次。
①:场上有场地魔法的场合,把这张卡从手卡丢弃,从卡组把1只「于贝尔」和1只「宝玉兽」怪兽送去墓地才能发动。从卡组把1张「高等暗黑结界」在自己场地区域表侧表示放置,从卡组把1只「高等宝玉兽」怪兽特殊召唤。
①:场上有场地魔法的场合,把这张卡从手卡丢弃,从卡组把1只「于贝尔」和1只「宝玉兽」怪兽送去墓地才能发动。从卡组·手卡把1张「高等暗黑结界」在自己场地区域表侧表示放置,从卡组·手卡把1只「高等宝玉兽」怪兽特殊召唤。
②:这张卡送去墓地的场合,以对方墓地1张魔法卡为对象才能发动。那张卡在自己场上盖放。
超级量子神盾 炎磁护罩(114514537) 永续陷阱 (Custom)
......@@ -7190,7 +7190,7 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
分类:水属性、天使族、恶魔族、主卡、动漫-GX
效果分类:特殊召唤、破坏耐性
云魔物的聚会(114514622) 水 5星 天使/融合 1800 5000 (Custom)
云魔物的聚会(114514622) 水 5星 天使/融合 600 5000 (Custom)
系列:0x18
「云魔物」怪兽+水属性怪兽
这张卡只能通过融合召唤或者以下方式从额外卡组特殊召唤:
......@@ -7203,11 +7203,11 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
效果分类:送去墓地、抽卡辅助、卡组检索、破坏耐性
提示文本:加入手卡、送去墓地、抽卡
云魔物的狂乱(114514623) 场地魔法 (Custom)
雾之王城(114514623) 场地魔法 (Custom)
系列:0x18
自己不能把场地魔法盖放或者发动。这个卡名的⑤的效果1回合只能使用1次。
①:自己不是「云魔物」怪兽·水族·魔法师族怪兽不能特殊召唤。
②:自己场上通常召唤的「云魔物」怪兽在自己回合内不受对方发动的卡的效果影响。
②:自己场上等级最高的「云魔物」怪兽以外的「云魔物」怪兽不受对方发动的卡的效果影响。
③:自己场上有「云魔物」怪兽的场合,这张卡不会被对方的效果破坏,不会成为对方的效果的对象。
④:自己场上有「云魔物」怪兽召唤的场合才能发动。给自己场上的怪兽全部各放置1个雾指示物,进行1只「云魔物」怪兽的召唤。
⑤:自己的魔法·陷阱区有4张以上卡的场合才能发动。自己场上的魔法·陷阱卡全部破坏,从卡组把1张「被封印」卡或者「究极封印解放仪式术」加入手卡。
......@@ -7539,7 +7539,7 @@ Take Your Heart(114514326) 通常陷阱 (Custom)
异次元格纳库(114514669) 场地魔法 (Custom)
这个卡名的①②的效果1回合各能使用1次。
①:作为这张卡发动时的效果处理,从卡组把1只被同盟怪兽记述有卡名的怪兽加入手卡,1只记述有那个卡名的同盟怪兽送去墓地。
①:作为这张卡发动时的效果处理,从卡组把1只被同盟怪兽记述有卡名的怪兽加入手卡,1只卡名不同的记述有那个卡名的同盟怪兽送去墓地。
②:自己场上有机械族怪兽特殊召唤的场合,以那之中1只为对象才能发动。从卡组把1只「扰乱」怪兽给那只怪兽装备。
提示文本:是否从卡组把卡加入手卡?
......@@ -7814,7 +7814,7 @@ V-喷射虎(114514702=>51638941) 风 5星 兽/同盟 1800 1600 (Custom)
扰乱的回忆(114514709) 通常陷阱 (Custom)
系列:0xF
这个卡名的①②的效果1回合只能使用其中1个。对方场上有怪兽的场合,这张卡也能从手卡发动。
①:以场上1只怪兽为对象才能发动。从卡组把3只「扰乱」怪兽当作攻击力上升500的装备卡使用给那只怪兽装备。装备怪兽被战斗·效果破坏的场合,作为代替把那些装备中的1张破坏。
①:以场上1只怪兽为对象才能发动。从卡组把3只「扰乱」怪兽当作攻击力上升500的装备卡使用给那只怪兽装备。装备怪兽被战斗·效果破坏的场合,作为代替把那些装备全部破坏。
②:这张卡从手卡·卡组送去墓地的场合才能发动。从卡组把1张「扰乱」卡加入手卡或者送去墓地。
分类:光属性、风属性、融合、动漫-GX-男二
效果分类:卡组检索、特殊召唤
......@@ -10245,6 +10245,58 @@ Take Over 5(114515020) 通常魔法 (Custom)
未被选择者(114515036) 通常魔法 (Custom)
①:对方场上有2只以上怪兽的场合才能发动。对方选自身场上1只怪兽。那只怪兽以外的对方场上的卡全部破坏。那之后,自己可以选这个效果送去墓地的怪兽中的1只在自己场上特殊召唤。
波荡水(114515051) 水 4阶 恐龙/超量 2500 2000 (Custom)
4星怪兽×3
①:场上有场地魔法·永续魔法·永续陷阱的场合,这张卡的攻击力上升1000,不会成为对方的效果的对象。
②:双方回合,把这个回合没有战斗过的这张卡1个超量素材取除,以场上1张卡为对象才能发动。那张卡破坏。
③:
破空焰(114515052) 炎 4阶 恐龙/超量 2300 2400 (Custom)
4星怪兽×3
①:场上有场地魔法·永续魔法·永续陷阱的场合,这张卡的攻击力上升1000,不会被战斗·效果破坏。
②:1回合1次,把这个回合没有战斗过的这张卡1个超量素材取除才能发动(不能对应这个效果的发动把卡的效果发动)。自己场上的怪兽的攻击力上升1000。
③:这张卡成为对方场上怪兽的效果或者攻击对象时,那只怪兽的攻击力变成一半。
猛雷鼓(114515053) 光 4阶 恐龙/超量 2700 2300 (Custom)
4星怪兽×3
①:场上有场地魔法·永续魔法·永续陷阱的场合,这张卡的攻击力上升1300。
②:1回合1次,攻击力比这张卡低的对方怪兽的效果发动时,把这个回合没有战斗过的这张卡1个超量素材取除才能发动。那个发动无效并破坏。
③:1回合1次,以对方场上1只怪兽为对象才能发动。那只怪兽破坏,这张卡的攻击力变成一半。
冥界之花(114516001) 通常魔法 (Custom)
①:从卡组把1只1星植物族怪兽特殊召唤。那之后,选场上1张卡破坏。
简易同调(114516002) 速攻魔法 (Custom)
系列:0x17
这个卡名的卡1回合只能发动1张。
①:把1只「调整衍生物」(恶魔族·暗·1星·攻/守0)特殊召唤。那之后,可以只用自己场上的怪兽进行1次同调召唤。这个回合,自己不是同调怪兽不能从额外卡组特殊召唤。
②:「红莲魔龙」或者有那个卡名记述的同调怪兽在自己场上存在的场合,把墓地的这张卡和1只暗属性·龙族怪兽除外,以自己墓地1张有「红莲魔龙」的卡名记述的魔法·陷阱卡为对象才能发动。那张卡在自己场上盖放。
调整衍生物(114516003) 暗 1星 恶魔/通常/衍生物 0 0 (Custom)
系列:0x143
「简易同调」的效果特殊召唤。
战斗调星(114516004) 速攻魔法 (Custom)
①:自己场上有同调怪兽的场合,战斗阶段才能发动。从手卡·墓地把1只调整特殊召唤(自己场上有「红莲魔龙」的场合,也能作为代替从卡组特殊召唤),只用包含那只怪兽的自己场上的怪兽进行1次同调召唤。
天地鸣动(114516005) 速攻魔法 (Custom)
这个卡名的②的效果1回合只能使用1次。
①:从以下效果中选1个发动(这个卡名的以下效果1回合各能选择1次)。
●以自己场上1只暗属性·龙族同调怪兽为对象才能发动。对方墓地的卡全部除外,那只怪兽的攻击力上升这个效果除外的卡数量×500。
●以自己墓地1只暗属性·龙族同调怪兽为对象才能发动。双方场上的怪兽全部破坏,那只怪兽特殊召唤,攻击力上升这个效果破坏的卡数量×500。
②:自己场上有「红莲魔龙」或者有那个卡名记述的同调怪兽的场合,把墓地的这张卡除外,从卡组把1张有「红莲魔龙」的卡名记述的通常魔法送去墓地才能发动。这个效果变成那张卡发动时的效果。
王者的鼓动(114516006) 速攻魔法 (Custom)
这个卡名的②的效果1回合只能使用1次。
①:以自己场上1只龙族同调怪兽为对象才能发动。直到下个回合结束时,那只怪兽不会被战斗破坏,战斗发生的对自己的战斗伤害变成0,已在对方场上的表侧表示存在的卡的效果无效化。「红莲魔龙」或者有那个卡名记述的同调怪兽在自己场上存在的场合,可以再选对方场上1只怪兽破坏。
②:自己结束阶段,自己的场上·墓地有暗属性·龙族同调怪兽的场合,把墓地的这张卡除外才能发动。从额外卡组把1只同名卡不在自己的场上·墓地存在的8星暗属性·龙族同调怪兽特殊召唤。
过调律(114516010) 通常陷阱 (Custom)
这张卡也能丢弃手卡1只恶魔族怪兽从手卡发动。这个卡名的②的效果1回合只能使用1次。
①:以场上1只表侧表示怪兽为对象才能发动。那只怪兽的攻击力下降700,等级下降1星。
②:把墓地的这张卡除外才能发动。从卡组把1张
有「红莲魔龙」的卡名记述的卡加入手卡。
电子鱼人-探查兵(禁用,待修改)(115128279) 水 1星 鱼 300 400 (Custom)
系列:0x96
这个卡名的①②效果1回合各能使用1次,发动回合自己不是水属性怪兽不能特殊召唤。
......@@ -12370,7 +12422,7 @@ lua by 芝士
命运英雄舞台(191981159) 场地魔法 (Custom)
系列:0xC008
这个卡名的卡1回合只能发动1张。
①:作为这张卡的发动时的效果处理,从卡组把「摩天楼」·「暗黑都市」·「幽狱之时计塔」中的1张在对方的场地区域表侧表示放置,从卡组把1「命运英雄」卡加入手卡。
①:作为这张卡的发动时的效果处理,从卡组把「摩天楼」·「暗黑都市」·「幽狱之时计塔」中的1张在对方的场地区域表侧表示放置,从卡组把1「命运英雄」卡加入手卡。
②:自己怪兽区域的「龙骑士 D-终」不受对方的效果影响。
③:「龙骑士 D-终」或者「命运英雄」怪兽召唤·特殊召唤的场合才能发动。所有场地区域表侧表示的「幽狱之时计塔」放置1个时针指示物。
④:1回合1次,对方受到伤害的场合,以场上1张卡为对象才能发动。那张卡破坏。
......@@ -12576,7 +12628,8 @@ lua by 魊影透明鱼
提示文本:是否展示卡来发动?、、抽卡、盖放、除外、适用「提斯蒂娜的灾厄」的效果来发动
毁灭元素(191981311) 反击陷阱 (Custom)
这个卡名的①②的效果1回合各能使用1次。场地区域有表侧表示的卡的场合,这张卡的发动从手卡也能用。
系列:0x1A4、0x1AD
这张卡在规则上视作「灰灭」和「提斯蒂娜」卡。这个卡名的①②的效果1回合各能使用1次。场地区域有表侧表示的卡的场合,这张卡的发动从手卡也能用。
①:对方的卡的效果发动时,丢弃手卡1只5星以上的炎族·水族的光·暗属性怪兽才能发动(场上有5星·5阶以上而炎族·水族的光·暗属性怪兽的场合,也能不丢弃)。那个发动无效并破坏。
②:把墓地的这张卡除外,以自己墓地2张场地魔法卡为对象才能发动。那之内的1张在自己场地区域表侧表示放置,另1张在对方场地区域表侧表示放置。
提示文本:是否丢弃卡来发动?、请选择要在自己场上放置的卡、适用「毁灭元素」的效果来发动
......
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