Commit 088d20ec authored by 未闻皂名's avatar 未闻皂名

2025/10/8 新增:超战士的闪光,THE☆战斗撞击剑

parent 41add2b1
Pipeline #40939 passed with stages
in 13 minutes and 12 seconds
No preview for this file type
......@@ -438,9 +438,9 @@ function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, cou
return (RushDuel.GroupAllCount(g, Card.IsLocation, count1, zone1) and (not check1 or check1(g))) or
(RushDuel.GroupAllCount(g, Card.IsLocation, count2, zone2) and (not check2 or check2(g)))
end, false, min, max)
if sg:GetCount() == count1 and (not check1 or check1(sg)) then
if sg:FilterCount(filter1, nil) == count1 and (not check1 or check1(sg)) then
action1(sg, e, tp, eg, ep, ev, re, r, rp)
elseif sg:GetCount() == count2 and (not check2 or check2(sg)) then
elseif sg:FilterCount(filter2, nil) == count2 and (not check2 or check2(sg)) then
action2(sg, e, tp, eg, ep, ev, re, r, rp)
end
end
......
local cm,m=GetID()
local list={120293001}
cm.name="超战士的闪光"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.costfilter1(c)
return c:IsAbleToDeckAsCost()
end
function cm.costfilter2(c,e,tp)
return c:IsFaceup() and c:IsCode(list[1]) and RD.IsCanChangePosition(c,e,tp,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsFaceup() and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and c:IsCanTurnSet()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
cm.cost=RD.CostChooseAction(HINTMSG_TODECK,HINTMSG_POSCHANGE,aux.Stringid(m,1),
cm.costfilter1,nil,LOCATION_HAND,1,function(g,e,tp)
RD.SendToDeckSort(g,SEQ_DECKBOTTOM,REASON_COST,tp)
end,
cm.costfilter2,nil,LOCATION_MZONE,1,function(g,e,tp)
RD.ChangePosition(g,e,tp,REASON_COST)
end)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp)
local max=1
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_ONFIELD,0,1,nil) then
max=2
end
RD.SelectAndDoAction(HINTMSG_SET,filter,tp,0,LOCATION_MZONE,1,max,nil,function(g)
RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEDOWN_DEFENSE)
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="THE☆战斗撞击剑"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
c:RegisterEffect(e1)
--Cannot Activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(cm.eqcon)
e2:SetValue(cm.limit)
c:RegisterEffect(e2)
--Position
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.poscon)
e3:SetOperation(cm.posop)
c:RegisterEffect(e3)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup()
end
--Cannot Activate
function cm.eqcon(e)
return e:GetHandler():GetEquipTarget()~=nil
end
function cm.limit(e,re,tp)
local tc=re:GetHandler()
return tc:IsType(TYPE_EQUIP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
--Position
function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
return e:GetHandler():GetEquipTarget()==Duel.GetAttacker()
and tc and tc:IsDefensePos() and not tc:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
if tc:IsRelateToBattle() and tc:IsDefensePos() then
Duel.Hint(HINT_CARD,0,m)
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
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