Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
038ecdfe
Commit
038ecdfe
authored
May 12, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak
parent
e90ab044
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+10
-10
No files found.
libduel.cpp
View file @
038ecdfe
...
...
@@ -3057,7 +3057,7 @@ int32 scriptlib::duel_rock_paper_scissors(lua_State * L) {
uint8
repeat
=
TRUE
;
if
(
lua_gettop
(
L
)
>
0
)
repeat
=
lua_toboolean
(
L
,
1
);
pduel
->
game_field
->
add_process
(
PROCESSOR_ROCK_PAPER_SCISSORS
,
1
,
0
,
0
,
repeat
,
0
);
pduel
->
game_field
->
add_process
(
PROCESSOR_ROCK_PAPER_SCISSORS
,
0
,
0
,
0
,
repeat
,
0
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_get_coin_result
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
038ecdfe
...
...
@@ -5520,30 +5520,29 @@ int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player,
}
int32
field
::
rock_paper_scissors
(
uint16
step
,
uint8
repeat
)
{
switch
(
step
)
{
case
1
:
{
case
0
:
{
pduel
->
write_buffer8
(
MSG_ROCK_PAPER_SCISSORS
);
pduel
->
write_buffer8
(
0
);
return
FALSE
;
}
case
2
:
{
case
1
:
{
core
.
units
.
begin
()
->
arg2
=
returns
.
ivalue
[
0
];
pduel
->
write_buffer8
(
MSG_ROCK_PAPER_SCISSORS
);
pduel
->
write_buffer8
(
1
);
return
FALSE
;
}
case
3
:
{
core
.
units
.
begin
()
->
arg2
=
core
.
units
.
begin
()
->
arg2
+
(
returns
.
ivalue
[
0
]
<<
2
);
case
2
:
{
int32
hand0
=
core
.
units
.
begin
()
->
arg2
;
int32
hand1
=
returns
.
ivalue
[
0
];
pduel
->
write_buffer8
(
MSG_HAND_RES
);
pduel
->
write_buffer8
(
core
.
units
.
begin
()
->
arg2
);
if
(
(
core
.
units
.
begin
()
->
arg2
&
0x3
)
==
((
core
.
units
.
begin
()
->
arg2
>>
2
)
&
0x3
)
)
{
pduel
->
write_buffer8
(
hand0
+
(
hand1
<<
2
)
);
if
(
hand0
==
hand1
)
{
if
(
repeat
)
{
core
.
units
.
begin
()
->
step
=
0
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
else
returns
.
ivalue
[
0
]
=
PLAYER_NONE
;
}
else
if
(((
core
.
units
.
begin
()
->
arg2
&
0x3
)
==
1
&&
((
core
.
units
.
begin
()
->
arg2
>>
2
)
&
0x3
)
==
2
)
||
((
core
.
units
.
begin
()
->
arg2
&
0x3
)
==
2
&&
((
core
.
units
.
begin
()
->
arg2
>>
2
)
&
0x3
)
==
3
)
||
((
core
.
units
.
begin
()
->
arg2
&
0x3
)
==
3
&&
((
core
.
units
.
begin
()
->
arg2
>>
2
)
&
0x3
)
==
1
))
{
}
else
if
((
hand0
==
1
&&
hand1
==
2
)
||
(
hand0
==
2
&&
hand1
==
3
)
||
(
hand0
==
3
&&
hand1
==
1
))
{
returns
.
ivalue
[
0
]
=
1
;
}
else
{
returns
.
ivalue
[
0
]
=
0
;
...
...
@@ -5551,4 +5550,5 @@ int32 field::rock_paper_scissors(uint16 step, uint8 repeat) {
return
TRUE
;
}
}
return
TRUE
;
}
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