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
55502bf8
Commit
55502bf8
authored
Sep 07, 2024
by
zengsxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Theia, the Primal Being
parent
9fbbf129
Pipeline
#29598
passed with stages
in 1 minute and 12 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
script/c100226148.lua
script/c100226148.lua
+109
-0
No files found.
script/c100226148.lua
0 → 100644
View file @
55502bf8
--Theia, the Primal Being
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetOperation
(
s
.
checkop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCost
(
s
.
spcost
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
eg
:
IsContains
(
c
)
then
return
end
for
p
=
0
,
1
do
if
eg
:
IsExists
(
Card
.
IsSummonPlayer
,
1
,
nil
,
p
)
then
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
p
)
end
end
local
tptable
=
table.pack
(
c
:
GetFlagEffectLabel
(
id
))
local
tpvalue
=
{
0
,
0
}
for
i
,
v
in
ipairs
(
tptable
)
do
if
v
==
0
then
tpvalue
[
1
]
=
tpvalue
[
1
]
+
1
elseif
v
==
1
then
tpvalue
[
2
]
=
tpvalue
[
2
]
+
1
end
end
for
p
=
0
,
1
do
if
tpvalue
[
p
+
1
]
<
4
then
--spsummon count limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_COUNT_LIMIT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetValue
(
4
-
tpvalue
[
p
+
1
])
e1
:
SetLabel
(
p
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
elseif
tpvalue
[
p
+
1
]
==
4
then
--disable summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetLabel
(
p
)
e2
:
SetTarget
(
s
.
splimit
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
c
:
RegisterEffect
(
e3
)
end
end
end
function
s
.
splimit
(
e
,
c
,
sp
,
st
)
return
sp
==
e
:
GetLabel
()
end
function
s
.
relgoal
(
sg
,
tp
)
Duel
.
SetSelectedCard
(
sg
)
return
sg
:
CheckWithSumGreater
(
Card
.
GetLevel
,
11
)
and
aux
.
mzctcheckrel
(
sg
,
tp
)
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
mg
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
if
chk
==
0
then
return
mg
:
CheckSubGroup
(
s
.
relgoal
,
1
,
12
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
mg
:
SelectSubGroup
(
tp
,
s
.
relgoal
,
false
,
1
,
12
,
tp
)
aux
.
UseExtraReleaseCount
(
sg
,
tp
)
Duel
.
Release
(
sg
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
not
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tg
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
if
tg
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
else
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
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