Commit fc617651 authored by 苍蓝's avatar 苍蓝
parents 3803f253 33aad6b6
Pipeline #33266 passed with stages
in 11 minutes and 44 seconds
No preview for this file type
......@@ -4,6 +4,10 @@ RushDuel = RushDuel or {}
RushDuel.CurrentFusionEffect = nil
-- 额外的融合检测
RushDuel.FusionExtraChecker = nil
-- 最小融合素材数
RushDuel.MinFusionMaterialCount = nil
-- 最大融合素材数
RushDuel.MaxFusionMaterialCount = nil
-- 生成融合素材
function RushDuel.MakeFusionMaterial(card, ...)
......@@ -124,6 +128,12 @@ function RushDuel.FusionProcedureOperation(insf, sub, mats, extra, max, checker)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FMATERIAL)
local minc, maxc = #mats, #mats + max
if RushDuel.MinFusionMaterialCount ~= nil then
minc = math.max(minc, RushDuel.MinFusionMaterialCount)
end
if RushDuel.MaxFusionMaterialCount ~= nil then
maxc = math.min(maxc, RushDuel.MaxFusionMaterialCount)
end
local sg = mg:SelectSubGroup(tp, RushDuel.FusionProcedureMaterialChecker, true, minc, maxc, tp, c, chkfnf, sub, mats, extra, max, checker)
if sg == nil then
sg = Group.CreateGroup()
......@@ -339,9 +349,19 @@ end
-- 融合召唤 - 融合召唤的怪兽过滤
function RushDuel.FusionSpecialSummonFilter(c, e, tp, m, f, gc, chkf, filter)
RushDuel.CurrentFusionEffect = e
if e:IsHasProperty(EFFECT_FLAG_SPSUM_PARAM) then
local min, max = e:GetLabel()
RushDuel.MinFusionMaterialCount = min
RushDuel.MaxFusionMaterialCount = max
else
RushDuel.MinFusionMaterialCount = nil
RushDuel.MaxFusionMaterialCount = nil
end
local res = c:IsType(TYPE_FUSION) and (not filter or filter(c, e, tp, m, f, chkf)) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false) and
c:CheckFusionMaterial(m, gc, chkf)
RushDuel.CurrentFusionEffect = nil
RushDuel.MinFusionMaterialCount = nil
RushDuel.MaxFusionMaterialCount = nil
return res
end
-- 融合召唤 - 确认素材过滤
......@@ -423,8 +443,18 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move, cancelabl
end
local ce, mg = data[1], data[2]
RushDuel.CurrentFusionEffect = e
if e:IsHasProperty(EFFECT_FLAG_SPSUM_PARAM) then
local min, max = e:GetLabel()
RushDuel.MinFusionMaterialCount = min
RushDuel.MaxFusionMaterialCount = max
else
RushDuel.MinFusionMaterialCount = nil
RushDuel.MaxFusionMaterialCount = nil
end
local mat = Duel.SelectFusionMaterial(tp, fc, mg, gc, chkf)
RushDuel.CurrentFusionEffect = nil
RushDuel.MinFusionMaterialCount = nil
RushDuel.MaxFusionMaterialCount = nil
if #mat < 2 then
goto cancel
end
......
local m=120109049
local cm=_G["c"..m]
cm.name="化身混沌莱檬"
function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+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
--Discard Deck
function cm.exfilter(c)
return c:IsType(TYPE_NORMAL)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_GALAXY)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,3,cm.exfilter,1,nil) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_SPSUMMON)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
......
RD.SameCard(120218013,120277008)
\ No newline at end of file
......@@ -35,7 +35,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,cm.filter,tp,LOCATION_HAND,0,1,1,nil,function(g)
if RD.SendToGraveAndExists(g) then
if RD.SendToGraveAndExists(g) and Duel.GetFusionMaterial(tp):IsExists(cm.matfilter,1,nil) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,true)
end
end)
......
......@@ -8,6 +8,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,5)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
......@@ -24,6 +26,7 @@ function cm.exfilter(c)
and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.matcheck(tp,sg,fc)
return sg:GetCount()<=5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
......
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