Commit 63d75087 authored by 未闻皂名's avatar 未闻皂名

2025/9/21 离场前判定整合

parent 32849837
Pipeline #40693 passed with stages
in 12 minutes and 43 seconds
...@@ -111,6 +111,10 @@ function RushDuel.IsPreviousControler(card, player) ...@@ -111,6 +111,10 @@ function RushDuel.IsPreviousControler(card, player)
return card:GetPreviousControler() == player return card:GetPreviousControler() == player
end end
-- 条件: 位置变化前的类型 -- 条件: 位置变化前的类型
function RushDuel.IsPreviousCode(card, code)
return card:GetPreviousCodeOnField() == code
end
-- 条件: 位置变化前的类型
function RushDuel.IsPreviousType(card, type) function RushDuel.IsPreviousType(card, type)
return (card:GetPreviousTypeOnField() & type) ~= 0 return (card:GetPreviousTypeOnField() & type) ~= 0
end end
...@@ -122,6 +126,26 @@ end ...@@ -122,6 +126,26 @@ end
function RushDuel.IsPreviousRace(card, race) function RushDuel.IsPreviousRace(card, race)
return (card:GetPreviousRaceOnField() & race) ~= 0 return (card:GetPreviousRaceOnField() & race) ~= 0
end end
-- 条件: 位置变化前的等级
function RushDuel.IsPreviousLevel(card, level)
return card:GetPreviousLevelOnField() == level
end
-- 条件: 位置变化前的等级大于
function RushDuel.IsPreviousLevelAbove(card, level)
return card:GetPreviousLevelOnField() >= level
end
-- 条件: 位置变化前的等级小于
function RushDuel.IsPreviousLevelBelow(card, level)
return card:GetPreviousLevelOnField() > 0 and card:GetPreviousLevelOnField() <= level
end
-- 条件: 位置变化前的攻击力
function RushDuel.IsPreviousAttack(card, atk)
return card:GetPreviousAttackOnField() == atk
end
-- 条件: 位置变化前的攻击力大于
function RushDuel.IsPreviousAttackAbove(card, atk)
return card:GetPreviousAttackOnField() >= atk
end
-- 条件: 可以攻击 -- 条件: 可以攻击
function RushDuel.IsCanAttack(card) function RushDuel.IsCanAttack(card)
......
...@@ -37,13 +37,4 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,13 +37,4 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.atkcon(e) function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20110001)~=0 return e:GetHandler():GetFlagEffect(20110001)~=0
end
--Move
function cm.mvcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(flag,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ function cm.confilter(c,tp) ...@@ -16,7 +16,7 @@ function cm.confilter(c,tp)
return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget() return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget()
and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
and RD.IsPreviousAttribute(c,ATTRIBUTE_DARK) and RD.IsPreviousAttribute(c,ATTRIBUTE_DARK)
and c:GetPreviousAttackOnField()==0 and RD.IsPreviousAttack(c,0)
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelBelow(8) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelBelow(8)
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function cm.confilter(c,tp) function cm.confilter(c,tp)
return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget() return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget()
and RD.IsPreviousRace(c,RACE_WYRM) and RD.IsPreviousRace(c,RACE_WYRM)
and c:GetPreviousLevelOnField()>=7 and RD.IsPreviousLevelAbove(c,7)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_WYRM) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelAbove(7) and c:IsRace(RACE_WYRM) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
......
...@@ -15,8 +15,8 @@ function cm.initial_effect(c) ...@@ -15,8 +15,8 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c,tp) function cm.confilter(c,tp)
return (RD.IsLegendCode(c,list[1]) or c:GetPreviousCodeOnField()==list[1] or ( return (RD.IsLegendCode(c,list[1]) or RD.IsPreviousCode(c,list[1]) or (
RD.IsPreviousType(c,TYPE_NORMAL) and c:GetPreviousLevelOnField()>=7 and RD.IsPreviousRace(c,RACE_FIEND) RD.IsPreviousType(c,TYPE_NORMAL) and RD.IsPreviousLevelAbove(c,7) and RD.IsPreviousRace(c,RACE_FIEND)
)) and RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget() )) and RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget()
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -20,7 +20,7 @@ function cm.spfilter(c,e,tp) ...@@ -20,7 +20,7 @@ function cm.spfilter(c,e,tp)
end end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false,nil,nil,function(g) cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false,nil,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:GetPreviousLevelOnField()>0 and tc:GetPreviousLevelOnField()<=2 then if RD.IsPreviousLevelBelow(tc,2) then
return 20184003 return 20184003
else else
return 0 return 0
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c,tp,re,rp) function cm.confilter(c,tp,re,rp)
return c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7 return c:IsPreviousPosition(POS_ATTACK) and RD.IsPreviousLevelAbove(c,7)
and RD.IsPreviousRace(c,RACE_WARRIOR) and RD.IsPreviousRace(c,RACE_WARRIOR)
and RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE) and RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE)
and (c==Duel.GetAttackTarget() and (c==Duel.GetAttackTarget()
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c,tp,rp) function cm.confilter(c,tp,rp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE)
and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget()) and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget())
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.confilter(c,tp,rp) function cm.confilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousLevelOnField()==6 return c:IsPreviousPosition(POS_FACEUP) and RD.IsPreviousLevel(c,6)
and RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE) and RD.IsPreviousControler(c,tp) and c:IsPreviousLocation(LOCATION_MZONE)
and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget()) and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget())
end end
......
...@@ -16,7 +16,7 @@ function cm.confilter(c,tp) ...@@ -16,7 +16,7 @@ function cm.confilter(c,tp)
return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget() return RD.IsPreviousControler(c,tp) and c==Duel.GetAttackTarget()
and RD.IsPreviousAttribute(c,ATTRIBUTE_DARK) and RD.IsPreviousAttribute(c,ATTRIBUTE_DARK)
and RD.IsPreviousRace(c,RACE_GALAXY) and RD.IsPreviousRace(c,RACE_GALAXY)
and c:GetPreviousAttackOnField()>=1500 and RD.IsPreviousAttackAbove(c,1500)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_ATTACK) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_ATTACK)
......
...@@ -19,7 +19,7 @@ function cm.spfilter(c) ...@@ -19,7 +19,7 @@ function cm.spfilter(c)
return c:IsCode(list[1],list[2]) return c:IsCode(list[1],list[2])
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:GetPreviousOverlayCountOnField()>0 return RD.IsPreviousMaximumMode(c)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc) function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
if mat:IsExists(cm.exfilter,1,nil) then if mat:IsExists(cm.exfilter,1,nil) then
......
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