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

2023/1/18 新增:五神龙,融合新卡,更新翻译,修改融合函数

parent 20e02b87
Pipeline #19664 passed with stages
in 6 minutes and 39 seconds
No preview for this file type
......@@ -7,11 +7,13 @@ function RushDuel.AddFusionProcedure(card, ...)
end
-- 创建效果: 融合术/结合 召唤
function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_range, o_range, target_action, operation_action)
function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, target_action, operation_action)
local self_range = s_range or 0
local opponent_range = o_range or 0
local move = mat_move or RushDuel.FusionToGrave
local e = Effect.CreateEffect(card)
e:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
e:SetTarget(RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range, target_action))
e:SetOperation(RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_range, operation_action))
e:SetTarget(RushDuel.FusionTarget(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, target_action))
e:SetOperation(RushDuel.FusionOperation(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, operation_action))
return e
end
function RushDuel.FusionMaterialFilter(c, filter, e)
......@@ -20,7 +22,7 @@ end
function RushDuel.FusionSpecialSummonFilter(c, e, tp, m, f, chkf, filter)
return c:IsType(TYPE_FUSION) and (not filter or filter(c)) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false) and c:CheckFusionMaterial(m, nil, chkf)
end
function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range, action)
function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range, mat_check, action)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
local chkf = tp
......@@ -29,6 +31,7 @@ function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range,
local mg2 = Duel.GetMatchingGroup(exfilter, tp, s_range, o_range, nil)
mg1:Merge(mg2)
end
aux.FGoalCheckAdditional = mat_check
local res = Duel.IsExistingMatchingCard(RushDuel.FusionSpecialSummonFilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg1, nil, chkf, spfilter)
if not res then
local ce = Duel.GetChainMaterial(tp)
......@@ -39,6 +42,7 @@ function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range,
res = Duel.IsExistingMatchingCard(RushDuel.FusionSpecialSummonFilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg3, mf, chkf, spfilter)
end
end
aux.FGoalCheckAdditional = nil
return res
end
if action ~= nil then
......@@ -47,7 +51,7 @@ function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range,
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
end
function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_range, action)
function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, action)
return function(e, tp, eg, ep, ev, re, r, rp)
local chkf = tp
local mg1 = Duel.GetFusionMaterial(tp):Filter(RushDuel.FusionMaterialFilter, nil, matfilter, e)
......@@ -55,6 +59,7 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
local mg2 = Duel.GetMatchingGroup(exfilter, tp, s_range, o_range, nil, e)
mg1:Merge(mg2)
end
aux.FGoalCheckAdditional = mat_check
local sg1 = Duel.GetMatchingGroup(RushDuel.FusionSpecialSummonFilter, tp, LOCATION_EXTRA, 0, nil, e, tp, mg1, nil, chkf, spfilter)
local mg3 = nil
local sg2 = nil
......@@ -78,7 +83,7 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
if sg1:IsContains(fc) and (sg2 == nil or not sg2:IsContains(fc) or not Duel.SelectYesNo(tp, ce:GetDescription())) then
mat = Duel.SelectFusionMaterial(tp, fc, mg1, nil, chkf)
fc:SetMaterial(mat)
Duel.SendtoGrave(mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
mat_move(mat)
Duel.BreakEffect()
Duel.SpecialSummon(fc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
else
......@@ -91,5 +96,15 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp, mat, fc)
end
aux.FGoalCheckAdditional = nil
end
end
-- 素材去向: 墓地
function RushDuel.FusionToGrave(mat)
Duel.SendtoGrave(mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
end
-- 素材去向: 卡组
function RushDuel.FusionToDeck(mat)
Duel.SendtoDeck(mat, nil, SEQ_DECKSHUFFLE, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
end
local m=120109024
local list={120209001}
local cm=_G["c"..m]
cm.name="穿越侍·乌贼侍"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Pierce
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
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
--Pierce
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_GALAXY) and RD.IsCanAttachPierce(c)
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.posfilter(c)
return c:IsFaceup() and RD.IsCanChangePosition(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
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.IsExistingMatchingCard(cm.filter,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),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachPierce(e,g:GetFirst(),aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg)
end)
end
end)
end
\ No newline at end of file
......@@ -3,7 +3,8 @@ local cm=_G["c"..m]
cm.name="融合术"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,nil,0,0)
local e1=RD.CreateFusionEffect(c,cm.matfilter)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
......
......@@ -3,7 +3,8 @@ local cm=_G["c"..m]
cm.name="力量结合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,cm.operation)
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:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
......
local m=120235009
local cm=_G["c"..m]
cm.name="虚空噬骸兵·黑色矮人"
cm.name="虚空噬骸兵·黑矮星兵"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
......
local m=120235013
local cm=_G["c"..m]
cm.name="镜连接飞龙"
cm.name="镜像翼龙"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
......
local m=120235022
local list={120235052,120196050,120235020,120235021}
local cm=_G["c"..m]
cm.name="苍救骑士 蓝迦"
cm.name="苍救骑士 兰加"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
......
local m=120235023
local list={120235052,120196050}
local cm=_G["c"..m]
cm.name="苍救骑士 尔"
cm.name="苍救骑士 尔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Draw
......
local m=120235024
local cm=_G["c"..m]
cm.name="苍救骑士 拉"
cm.name="苍救骑士 西埃拉"
function cm.initial_effect(c)
--Atk Down
local e1=Effect.CreateEffect(c)
......
local m=120235025
local cm=_G["c"..m]
cm.name="苍救骑士 邓斯"
cm.name="苍救骑士 邓斯"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
......
local m=120235038
local list={120235024,120235020,120235054}
local cm=_G["c"..m]
cm.name="苍救之闪光 苏尔杰尔"
cm.name="苍救之闪光 苏勒希埃勒"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
......
local m=120235039
local list={120235024,120235021,120196050}
local cm=_G["c"..m]
cm.name="苍救之泡影 阿尔叠拉"
cm.name="苍救之泡影 阿卢蒂埃拉"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
......
local m=120235040
local list={120235025,120235020}
local cm=_G["c"..m]
cm.name="苍救之一闪 德雷斯"
cm.name="苍救之一闪 德雷斯"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
......
local m=120235041
local list={120235025,120235021}
local cm=_G["c"..m]
cm.name="苍救之幻影 德克穆尔"
cm.name="苍救之幻影 德卢库穆阿"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
......
local m=120238001
local cm=_G["c"..m]
cm.name="五神龙"
function cm.initial_effect(c)
--Fusion Material
aux.AddFusionProcFunRep(c,cm.material,5,true)
--Only Fusion Summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(cm.indes)
c:RegisterEffect(e1)
end
--Fusion Material
function cm.material(c)
return c:IsRace(RACE_DRAGON)
end
--Indes
function cm.indes(e,c)
return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND)
end
\ No newline at end of file
local m=120238024
local cm=_G["c"..m]
cm.name="龙群融合术"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON)
end
function cm.matfilter(c)
return c:IsFaceup() and c:IsOnField() and c:IsAbleToDeck()
and c:IsFusionType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
end
function cm.exfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToDeck()
end
function cm.matcheck(tp,sg,fc)
return sg:FilterCount(Card.IsOnField,nil)==1
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)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,1),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 not c:IsType(TYPE_FUSION)
end
\ No newline at end of file
local m=120238025
local cm=_G["c"..m]
cm.name="融合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
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