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
MyCard
pre-release-database-cdb
Commits
c6ac6ab6
Commit
c6ac6ab6
authored
Jul 19, 2025
by
Vury Leo
Committed by
wind2009
Jul 19, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve 真竜魔王マスターP
parent
584652d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
42 deletions
+92
-42
script/c101302018.lua
script/c101302018.lua
+92
-42
No files found.
script/c101302018.lua
View file @
c6ac6ab6
--真竜魔王マスターP
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--summon with s/t
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_ADD_EXTRA_TRIBUTE
)
e0
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e0
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_CONTINUOUS
))
e0
:
SetValue
(
POS_FACEUP_ATTACK
)
c
:
RegisterEffect
(
e0
)
--summon with 3 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -43,30 +52,10 @@ function s.otfilter(c)
end
function
s
.
ttcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
otfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
)
return
minc
<=
3
and
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>=
3
or
Duel
.
CheckTribute
(
c
,
1
)
and
mg
:
GetCount
()
>=
2
or
Duel
.
CheckTribute
(
c
,
2
)
and
mg
:
GetCount
()
>=
1
or
Duel
.
CheckTribute
(
c
,
3
))
return
minc
<=
3
and
Duel
.
CheckTribute
(
c
,
3
)
end
function
s
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
otfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Group
.
CreateGroup
()
local
ct
=
3
while
mg
:
GetCount
()
>
0
and
(
ct
>
2
and
Duel
.
CheckTribute
(
c
,
ct
-
2
)
or
ct
>
1
and
Duel
.
CheckTribute
(
c
,
ct
-
1
)
or
ct
>
0
and
ft
>
0
)
and
(
not
Duel
.
CheckTribute
(
c
,
ct
)
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
)))
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
mg
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Merge
(
g1
)
mg
:
Sub
(
g1
)
ct
=
ct
-
1
end
if
g
:
GetCount
()
<
3
then
local
g2
=
Duel
.
SelectTribute
(
tp
,
c
,
3
-
g
:
GetCount
(),
3
-
g
:
GetCount
())
g
:
Merge
(
g2
)
end
local
g
=
Duel
.
SelectTribute
(
tp
,
c
,
3
,
3
)
c
:
SetMaterial
(
g
)
Duel
.
Release
(
g
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
...
...
@@ -97,28 +86,89 @@ function s.tpcon(e,tp,eg,ep,ev,re,r,rp)
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsPreviousControler
(
tp
)))
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
local
ph
=
Duel
.
GetCurrentPhase
()
function
s
.
tpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
if
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
then
e1
:
SetCode
(
EFFECT_SKIP_M2
)
else
e1
:
SetCode
(
EFFECT_SKIP_M1
)
-- guard for "next opponent turn" skips of Main 1
function
s
.
turncon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
end
-- helper to schedule a one‑time skip effect
-- code: EFFECT_SKIP_M1 or EFFECT_SKIP_M2
-- next_turn: if true, skips on opponent’s *next* turn (via turncon);
-- if false, skips the upcoming phase *this* turn
function
s
.
schedule_skip
(
c
,
tp
,
code
,
next_turn
)
local
phase
=
PHASE_MAIN1
if
code
==
EFFECT_SKIP_M2
then
phase
=
PHASE_MAIN2
end
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
if
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
Duel
.
GetCurrentPhase
()
>=
PHASE_MAIN1
then
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetCondition
(
s
.
turncon
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
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
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
-- 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
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e
,
tp
)
return
e
end
function
s
.
turncon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
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
()
-- 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 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
if
ph
<
PHASE_MAIN1
then
s
.
schedule_skip
(
c
,
tp
,
EFFECT_SKIP_M1
,
false
)
return
end
assert
(
false
)
end
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