Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vury Leo
pre-release-database-cdb
Commits
1cfed1e4
Commit
1cfed1e4
authored
Jul 20, 2025
by
Vury Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
parent
c16291ac
Pipeline
#39225
failed with stages
in 1 minute and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
60 deletions
+60
-60
script/c101302018.lua
script/c101302018.lua
+60
-60
No files found.
script/c101302018.lua
View file @
1cfed1e4
...
...
@@ -88,7 +88,7 @@ end
-- guard for "next opponent turn" skips of Main 1
function
s
.
turncon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
end
-- helper to schedule a one‑time skip effect
...
...
@@ -100,73 +100,73 @@ function s.schedule_skip(c,tp,code,next_turn)
if
code
==
EFFECT_SKIP_M2
then
phase
=
PHASE_MAIN2
end
local
e
=
Effect
.
CreateEffect
(
c
)
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
code
)
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetTargetRange
(
0
,
1
)
if
next_turn
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
e
:
SetCondition
(
s
.
turncon
)
-- covers end of this opp turn + end of next opp turn
e
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
else
-- reset as soon as that phase would start on their turn, this turn
e
:
SetReset
(
RESET_PHASE
+
phase
+
RESET_OPPO_TURN
,
1
)
end
Duel
.
RegisterEffect
(
e
,
tp
)
return
e
local
e
=
Effect
.
CreateEffect
(
c
)
e
:
SetType
(
EFFECT_TYPE_FIELD
)
e
:
SetCode
(
code
)
e
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
:
SetTargetRange
(
0
,
1
)
if
next_turn
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
e
:
SetCondition
(
s
.
turncon
)
-- covers end of this opp turn + end of next opp turn
e
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
else
-- reset as soon as that phase would start on their turn, this turn
e
:
SetReset
(
RESET_PHASE
+
phase
+
RESET_OPPO_TURN
,
1
)
end
Duel
.
RegisterEffect
(
e
,
tp
)
return
e
end
function
s
.
tpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
op
=
1
-
tp
local
ph
=
Duel
.
GetCurrentPhase
()
local
turn_player
=
Duel
.
GetTurnPlayer
()
local
c
=
e
:
GetHandler
()
local
op
=
1
-
tp
local
ph
=
Duel
.
GetCurrentPhase
()
local
turn_player
=
Duel
.
GetTurnPlayer
()
-- My turn → skip their NEXT Main 1 (on turn change)
if
turn_player
==
tp
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
return
end
-- My turn → skip their NEXT Main 1 (on turn change)
if
turn_player
==
tp
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
return
end
-- Opponent in Battle Phase → skip their upcoming Main 2
if
Duel
.
IsBattlePhase
()
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M2
,
false
)
return
end
-- Opponent in Battle Phase → skip their upcoming Main 2
if
Duel
.
IsBattlePhase
()
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M2
,
false
)
return
end
-- Opponent in Main 1 →
-- a) schedule skip of *next* Main 1,
-- b) but pivot to skip M2 if they enter BP
if
ph
==
PHASE_MAIN1
then
-- skip their *next* M1
local
skip_m1
=
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
-- Opponent in Main 1 →
-- a) schedule skip of *next* Main 1,
-- b) but pivot to skip M2 if they enter BP
if
ph
==
PHASE_MAIN1
then
-- skip their *next* M1
local
skip_m1
=
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
-- b) watch for BP to cancel M1 skip & schedule M2 skip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
-- PHASE_BATTLE is the end of BP
e2
:
SetCountLimit
(
1
)
e2
:
SetLabelObject
(
skip_m1
)
e2
:
SetOperation
(
function
(
ee
,
tp2
,
eg2
,
ep2
,
ev2
,
re2
,
rp2
)
ee
:
GetLabelObject
():
Reset
()
-- cancel skip‑M1
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M2
,
false
)
ee
:
Reset
()
-- destroy watcher
end
)
-- expires at end of their turn if no BP
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
RegisterEffect
(
e2
,
op
)
return
end
-- Opponent in Main 2/EP → skip their *next* Main 1 (on their next turn)
if
ph
>=
PHASE_MAIN2
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
return
end
-- Opponent before Main 1 (Draw/Standby) → skip this turn’s Main 1
-- b) watch for BP to cancel M1 skip & schedule M2 skip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
-- PHASE_BATTLE is the end of BP
e2
:
SetCountLimit
(
1
)
e2
:
SetLabelObject
(
skip_m1
)
e2
:
SetOperation
(
function
(
ee
,
tp2
,
eg2
,
ep2
,
ev2
,
re2
,
rp2
)
ee
:
GetLabelObject
():
Reset
()
-- cancel skip‑M1
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M2
,
false
)
ee
:
Reset
()
-- destroy watcher
end
)
-- expires at end of their turn if no BP
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
RegisterEffect
(
e2
,
op
)
return
end
-- Opponent in Main 2/EP → skip their *next* Main 1 (on their next turn)
if
ph
>=
PHASE_MAIN2
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
true
)
return
end
-- Opponent before Main 1 (Draw/Standby) → skip this turn’s Main 1
if
ph
<
PHASE_MAIN1
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
false
)
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
false
)
return
end
assert
(
false
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment