Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
mercury233
ygopro2
Commits
98e5640e
Commit
98e5640e
authored
Apr 26, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtf RockPaperScissors implement
parent
ae7b4792
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+16
-0
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
98e5640e
...
@@ -1788,6 +1788,17 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1788,6 +1788,17 @@ public class Ocgcore : ServantWithCardDescription
printDuelLog
(
InterString
.
Get
(
"骰子结果:[?]"
,
data
.
ToString
()));
printDuelLog
(
InterString
.
Get
(
"骰子结果:[?]"
,
data
.
ToString
()));
}
}
break
;
break
;
case
GameMessage
.
HandResult
:
data
=
r
.
ReadByte
();
int
data1
=
data
&
0x3
;
int
data2
=
(
data
>>
2
)
&
0x3
;
string
res1
=
(
data1
==
1
?
"剪刀"
:
(
data1
==
2
?
"布"
:
"石头"
));
string
res2
=
(
data2
==
1
?
"剪刀"
:
(
data2
==
2
?
"布"
:
"石头"
));
if
(
isFirst
)
printDuelLog
(
"猜拳结果:你好像出了"
+
res2
+
data2
.
ToString
()
+
",对方好像出了"
+
res1
+
data1
.
ToString
());
else
printDuelLog
(
"猜拳结果:你好像出了"
+
data1
.
ToString
()
+
res1
+
",对方好像出了"
+
res2
+
data2
.
ToString
());
break
;
case
GameMessage
.
Attack
:
case
GameMessage
.
Attack
:
game_card
=
GCS_cardGet
(
r
.
ReadGPS
(),
false
);
game_card
=
GCS_cardGet
(
r
.
ReadGPS
(),
false
);
string
derectattack
=
""
;
string
derectattack
=
""
;
...
@@ -4105,6 +4116,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4105,6 +4116,11 @@ public class Ocgcore : ServantWithCardDescription
sendReturn
(
binaryMaster
.
get
());
sendReturn
(
binaryMaster
.
get
());
}
}
break
;
break
;
case
GameMessage
.
RockPaperScissors
:
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
UnityEngine
.
Random
.
Range
(
0
,
2
));
sendReturn
(
binaryMaster
.
get
());
break
;
case
GameMessage
.
ConfirmDecktop
:
case
GameMessage
.
ConfirmDecktop
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
...
...
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