Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
E
Entertainment Server
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
Peter Xin
Entertainment Server
Commits
8ff42bfb
Commit
8ff42bfb
authored
Jul 06, 2024
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refresh on 2024-07-06 11:56:28
parent
09e87a36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
script/c40412020.lua
script/c40412020.lua
+25
-12
No files found.
script/c40412020.lua
View file @
8ff42bfb
...
...
@@ -16,6 +16,7 @@ function s.initial_effect(c)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--attack
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -53,31 +54,42 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3cfe
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
return
c
:
IsSetCard
(
0x3cfe
)
and
c
:
Is
Type
(
TYPE_MONSTER
)
and
c
:
Is
CanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
(
not
c
:
IsLocation
(
LOCATION_REMOVED
)
or
c
:
IsFaceup
())
end
--[[
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if
chk
==
0
then
return
ft
>
0
and
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
local
rt
=
Duel
.
GetMatchingGroupCount
(
s
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
if
rt
>
ft
then
rt
=
ft
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
rt
=
1
end
local
ct
=
c
:
RemoveOverlayCard
(
tp
,
1
,
rt
,
REASON_COST
)
--local dt=Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil,e,tp)
local dt=Duel.GetTargetCount(s.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local mt=math.min(ft,dt)
--if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local ct=c:RemoveOverlayCard(tp,1,mt,REASON_COST)
e:SetLabel(ct)
end]]
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
e
:
SetLabel
(
100
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
dt
=
Duel
.
GetMatchingGroup
(
s
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
rg
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
1
or
5
local
maxc
=
math.min
(
rg
,
ft
,
dt
:
GetCount
())
if
chk
==
0
then
return
maxc
>
0
and
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
local
ct
=
c
:
RemoveOverlayCard
(
tp
,
1
,
maxc
,
REASON_COST
)
e
:
SetLabel
(
ct
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
e
:
GetLabel
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
ct
,
nil
,
e
,
tp
)
end
e
:
SetOperation
(
s
.
spop
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
ct
,
0
,
0
)
if
chk
==
0
then
return
e
:
GetLabel
()
==
100
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
ct
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
ft
>
0
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
ct
=
e
:
GetLabel
()
if
ct
>
ft
then
ct
=
ft
end
if
ft
<
ct
or
ft
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
dg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
ct
,
ct
,
nil
,
e
,
tp
)
if
dg
:
GetCount
()
>
0
then
...
...
@@ -91,6 +103,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
ep
~=
tp
and
tc
:
IsControler
(
tp
)
and
tc
:
IsSetCard
(
0x3cfe
)
...
...
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