Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
Ai
ygopro-222DIY-cards
Commits
0d4a066b
You need to sign in or sign up before continuing.
Commit
0d4a066b
authored
Aug 13, 2023
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c101202042.lua
parent
847624cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
108 deletions
+36
-108
expansions/script/c101202042.lua
expansions/script/c101202042.lua
+36
-108
No files found.
expansions/script/c101202042.lua
View file @
0d4a066b
--
coded by Lyris, Lanpa and beyond
--
厄災の星ティ・フォン
--Stellar Nemesis T-PHON - Doomsday Star
--Stellar Nemesis T-PHON - Doomsday Star
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
local
special_count
=
{}
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--material
--material
aux
.
AddXyzProcedure
(
c
,
nil
,
12
,
2
)
aux
.
AddXyzProcedure
(
c
,
nil
,
12
,
2
,
s
.
mfilter
(
c
:
GetControler
()),
aux
.
Stringid
(
id
,
0
),
2
,
s
.
altop
)
s
.
AddMaxXyzProcedure
(
c
)
if
not
s
.
global_check
then
if
not
s
.
global_check
then
s
.
global_check
=
true
s
.
global_check
=
true
local
ge1
=
Effect
.
Global
Effect
(
c
)
local
ge1
=
Effect
.
Create
Effect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
s
.
chcon
)
ge1
:
SetOperation
(
s
.
chk
)
ge1
:
SetOperation
(
s
.
chop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
--limit summons
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
s
.
lscon
)
e1
:
SetOperation
(
s
.
lsop
)
c
:
RegisterEffect
(
e1
)
--limit effects
--limit effects
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -24,7 +30,7 @@ function s.initial_effect(c)
...
@@ -24,7 +30,7 @@ function s.initial_effect(c)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetCondition
(
s
.
lecon
)
e2
:
SetCondition
(
s
.
lecon
)
e2
:
Set
Value
(
s
.
actlimit
)
e2
:
Set
Target
(
s
.
letg
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--to hand
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
...
@@ -38,6 +44,26 @@ function s.initial_effect(c)
...
@@ -38,6 +44,26 @@ function s.initial_effect(c)
e3
:
SetOperation
(
s
.
thop
)
e3
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
chk
(
e
,
tp
,
eg
)
for
p
=
0
,
1
do
if
eg
:
IsExists
(
Card
.
IsSummonPlayer
,
1
,
nil
,
1
-
p
)
then
Duel
.
RegisterFlagEffect
(
p
,
id
,
RESET_PHASE
+
PHASE_END
,
0
,
2
)
end
end
end
function
s
.
mfilter
(
tp
)
return
function
(
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
):
GetMaxGroup
(
Card
.
GetAttack
)
return
g
and
#
g
>
0
and
g
:
IsContains
(
c
)
end
end
function
s
.
altop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
id
)
>
1
end
e
:
GetHandler
():
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
s
.
lscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
id
)
>
0
end
function
s
.
lsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
3
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
3
))
...
@@ -51,13 +77,12 @@ function s.lsop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -51,13 +77,12 @@ function s.lsop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
3
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
3
))
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
e
:
Reset
()
end
end
function
s
.
lecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
end
function
s
.
actlimit
(
e
,
re
,
tp
)
function
s
.
letg
(
e
,
te
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
r
e
:
GetHandler
():
IsAttackAbove
(
3000
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
t
e
:
GetHandler
():
IsAttackAbove
(
3000
)
end
end
function
s
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -73,101 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -73,101 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
function
s
.
chcon
(
e
,
tp
,
eg
,
ev
,
ep
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cf
,
1
,
nil
,
1
-
tp
)
end
function
s
.
cf
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_EXTRA
)
end
function
s
.
chop
(
e
,
tp
,
eg
,
ev
,
ep
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
s
.
cf
,
1
,
nil
,
1
-
tp
)
then
local
turn
=
Duel
.
GetTurnCount
()
if
not
special_count
[
1
-
ep
]
then
special_count
[
1
-
ep
]
=
{}
end
if
not
special_count
[
1
-
ep
][
turn
]
then
special_count
[
1
-
ep
][
turn
]
=
0
end
special_count
[
1
-
ep
][
turn
]
=
special_count
[
1
-
ep
][
turn
]
+
1
end
end
function
s
.
AddMaxXyzProcedure
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1165
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
s
.
xyzcon
)
e1
:
SetTarget
(
s
.
xyztg
)
e1
:
SetOperation
(
s
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
return
e1
end
function
s
.
xyzcon
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
turn
=
Duel
.
GetTurnCount
()
if
not
special_count
[
tp
]
then
return
false
end
if
not
special_count
[
tp
][
turn
]
and
not
special_count
[
tp
][
turn
-
1
]
then
return
false
end
local
the_true
=
2
if
(
special_count
[
tp
][
turn
]
and
special_count
[
tp
][
turn
]
<
2
)
or
not
special_count
[
tp
][
turn
]
then
the_true
=
the_true
-
1
end
if
(
special_count
[
tp
][
turn
-
1
]
and
special_count
[
tp
][
turn
-
1
]
<
2
)
or
not
special_count
[
tp
][
turn
-
1
]
then
the_true
=
the_true
-
1
end
if
the_true
==
0
then
return
false
else
the_true
=
nil
end
local
g
=
nil
if
og
then
g
=
og
else
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
local
ct
=
0
if
#
g
>
0
then
a
,
ct
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
end
return
g
:
CheckSubGroup
(
s
.
MaxXyzGoal
,
1
,
1
,
tp
,
c
,
ct
)
end
function
s
.
xyztg
(
e
,
tp
,
og
)
local
c
=
e
:
GetHandler
()
local
turn
=
Duel
.
GetTurnCount
()
if
not
special_count
[
tp
]
then
return
false
end
if
not
special_count
[
tp
][
turn
]
and
not
special_count
[
tp
][
turn
-
1
]
then
return
false
end
local
the_true
=
2
if
(
special_count
[
tp
][
turn
]
and
special_count
[
tp
][
turn
]
<
2
)
or
not
special_count
[
tp
][
turn
]
then
the_true
=
the_true
-
1
end
if
(
special_count
[
tp
][
turn
-
1
]
and
special_count
[
tp
][
turn
-
1
]
<
2
)
or
not
special_count
[
tp
][
turn
-
1
]
then
the_true
=
the_true
-
1
end
if
the_true
==
0
then
return
false
else
the_true
=
nil
end
local
g
=
nil
if
og
then
g
=
og
else
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
local
cancel
=
Duel
.
IsSummonCancelable
()
aux
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
Duel
.
Hint
(
3
,
tp
,
513
)
local
ct
=
0
if
#
g
>
0
then
a
,
ct
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
end
local
mg
=
g
:
SelectSubGroup
(
tp
,
s
.
MaxXyzGoal
,
cancel
,
1
,
1
,
tp
,
c
,
ct
)
aux
.
GCheckAdditional
=
nil
if
mg
and
mg
:
GetCount
()
>
0
then
mg
:
KeepAlive
()
e
:
SetLabelObject
(
mg
)
return
true
else
return
false
end
end
function
s
.
xyzop
(
e
,
tp
,
og
)
local
c
=
e
:
GetHandler
()
local
g
=
e
:
GetLabelObject
()
local
sg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_XYZ
)
if
#
g
>
0
then
local
tc
=
sg
:
GetFirst
()
while
tc
do
local
ag
=
tc
:
GetOverlayGroup
()
if
#
ag
>
0
then
g
:
Merge
(
ag
)
end
tc
=
sg
:
GetNext
()
end
end
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
g
:
DeleteGroup
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetOperation
(
s
.
lsop
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
MaxXyzGoal
(
g
,
tp
,
xyzc
,
ct
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
g
)
or
g
:
IsExists
(
function
(
c
)
return
not
c
:
IsCanBeXyzMaterial
(
xyzc
)
end
,
1
,
nil
)
then
return
false
end
return
g
:
IsExists
(
Card
.
IsAttack
,
nil
,
1
,
ct
)
end
end
\ No newline at end of file
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