Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
1d341758
Commit
1d341758
authored
May 08, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d7eaa45c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
366 additions
and
204 deletions
+366
-204
expansions/script/c21100900.lua
expansions/script/c21100900.lua
+61
-34
expansions/script/c21100905.lua
expansions/script/c21100905.lua
+61
-34
expansions/script/c21100910.lua
expansions/script/c21100910.lua
+61
-34
expansions/script/c21100915.lua
expansions/script/c21100915.lua
+61
-34
expansions/script/c21100920.lua
expansions/script/c21100920.lua
+61
-34
expansions/script/c21100925.lua
expansions/script/c21100925.lua
+61
-34
No files found.
expansions/script/c21100900.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
false
...
...
expansions/script/c21100905.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
false
...
...
expansions/script/c21100910.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
false
...
...
expansions/script/c21100915.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
false
...
...
expansions/script/c21100920.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
false
...
...
expansions/script/c21100925.lua
View file @
1d341758
...
...
@@ -48,41 +48,60 @@ function cm.initial_effect(c)
e4
:
SetCondition
(
cm
.
con4
)
e4
:
SetOperation
(
cm
.
op4
)
c
:
RegisterEffect
(
e4
)
if
not
Strong_Boxer_random_seed
then
local
result
=
0
local
g
=
Duel
.
GetDecktopGroup
(
0
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetDecktopGroup
(
1
,
5
)
local
tc
=
g
:
GetFirst
()
while
tc
do
result
=
result
+
tc
:
GetCode
()
tc
=
g
:
GetNext
()
end
g
:
DeleteGroup
()
Strong_Boxer_random_seed
=
result
function
Strong_Boxer_roll
(
min
,
max
)
if
min
==
max
then
return
min
end
min
=
tonumber
(
min
)
max
=
tonumber
(
max
)
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
if
min
~=
nil
then
if
max
==
nil
then
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
return
math.floor
(
random_number
*
min
)
+
1
else
local
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
random_number
<
min
then
Strong_Boxer_random_seed
=
(
Strong_Boxer_random_seed
*
16807
)
%
2147484647
random_number
=
Strong_Boxer_random_seed
/
2147484647
if
not
_globetrot
then
_globetrot
=
true
globetrot
=
{}
globetrot
.
x
=
5
globetrot
.
pair
=
{}
for
i
=
1
,
globetrot
.
x
do
globetrot
.
pair
[
i
]
=
{}
globetrot
.
pair
[
i
][
"first"
]
=
i
globetrot
.
pair
[
i
][
"second"
]
=
0
end
function
globetrot
.
quick_sort
(
start
,
last
)
local
left
,
right
=
start
,
last
if
left
<
right
then
while
left
<
right
do
while
globetrot
.
pair
[
left
][
"second"
]
<=
globetrot
.
pair
[
start
][
"second"
]
and
left
<
last
do
left
=
left
+
1
end
while
globetrot
.
pair
[
right
][
"second"
]
>=
globetrot
.
pair
[
start
][
"second"
]
and
right
>
start
do
right
=
right
-
1
end
if
left
<
right
then
local
_first
=
globetrot
.
pair
[
left
][
"first"
]
local
_second
=
globetrot
.
pair
[
left
][
"second"
]
globetrot
.
pair
[
left
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
left
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
else
break
end
return
math.floor
((
max
-
min
)
*
random_number
)
+
1
+
min
end
local
_first
=
globetrot
.
pair
[
start
][
"first"
]
local
_second
=
globetrot
.
pair
[
start
][
"second"
]
globetrot
.
pair
[
start
][
"first"
]
=
globetrot
.
pair
[
right
][
"first"
]
globetrot
.
pair
[
start
][
"second"
]
=
globetrot
.
pair
[
right
][
"second"
]
globetrot
.
pair
[
right
][
"first"
]
=
_first
globetrot
.
pair
[
right
][
"second"
]
=
_second
globetrot
.
quick_sort
(
start
,
right
-
1
)
globetrot
.
quick_sort
(
right
+
1
,
last
)
end
return
Strong_Boxer_random_seed
end
function
globetrot
.
random
(
seed
,
num
)
local
s
=
num
or
0
seed
=
math.floor
(
math.abs
(
seed
))
seed
=
(
seed
*
16807
)
%
2147483647
local
n
=
seed
%
5
n
=
(
n
<
0
)
and
(
n
+
5
)
or
n
local
res
=
n
+
1
globetrot
.
quick_sort
(
1
,
globetrot
.
x
)
if
s
<=
3
and
res
~=
globetrot
.
pair
[
1
][
"first"
]
and
globetrot
.
pair
[
globetrot
.
x
][
"second"
]
-
globetrot
.
pair
[
1
][
"second"
]
>
1
then
res
=
globetrot
.
pair
[
1
][
"first"
]
end
return
res
end
end
if
not
cm
.
_
then
...
...
@@ -155,8 +174,16 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
cm
.
A_status
[
tp
+
1
]
=
false
local
x
while
true
do
x
=
Strong_Boxer_roll
(
1
,
5
)
if
cm
[
tostring
(
x
)](
c
)
then
break
end
x
=
Duel
.
GetRandomNumber
(
1
,
5
)
x
=
globetrot
.
random
(
x
)
if
cm
[
tostring
(
x
)](
c
)
then
for
i
=
1
,
globetrot
.
x
do
if
globetrot
.
pair
[
i
][
"first"
]
==
x
then
globetrot
.
pair
[
i
][
"second"
]
=
globetrot
.
pair
[
i
][
"second"
]
+
1
end
end
break
end
end
cm
.
_return
(
c
,
x
)
return
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