Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
YGOProUnity_V2
Commits
61c70af7
Commit
61c70af7
authored
Apr 14, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test add SelectUnselectCard
parent
cbfa365b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
11 deletions
+145
-11
.gitignore
.gitignore
+5
-0
AI_core_vs2017solution/coreWrapper/coreWrapper.cs
AI_core_vs2017solution/coreWrapper/coreWrapper.cs
+30
-1
Assets/Plugins/System.Servicemodel.Faltexception.dll
Assets/Plugins/System.Servicemodel.Faltexception.dll
+0
-0
Assets/Plugins/System.Servicemodel.Faltexception.dll.meta
Assets/Plugins/System.Servicemodel.Faltexception.dll.meta
+22
-8
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+82
-1
Assets/YGOSharp/Enums/GameMessage.cs
Assets/YGOSharp/Enums/GameMessage.cs
+6
-1
No files found.
.gitignore
View file @
61c70af7
...
...
@@ -40,3 +40,8 @@ deck/
pack/
texture/
config/
bin/
Release/
AI_core_vs2017solution/core.VC.db
AI_core_vs2017solution/core.VC.VC.opendb
AI_core_vs2017solution/System.Servicemodel.Faltexception.dll
AI_core_vs2017solution/coreWrapper/coreWrapper.cs
View file @
61c70af7
...
...
@@ -103,6 +103,7 @@ namespace Percy
SelectSum
=
23
,
SelectDisfield
=
24
,
SortCard
=
25
,
SelectUnselectCard
=
26
,
ConfirmDecktop
=
30
,
ConfirmCards
=
31
,
ShuffleDeck
=
32
,
...
...
@@ -112,8 +113,10 @@ namespace Percy
ShuffleSetCard
=
36
,
ReverseDeck
=
37
,
DeckTop
=
38
,
ShuffleExtra
=
39
,
NewTurn
=
40
,
NewPhase
=
41
,
ConfirmExtratop
=
42
,
Move
=
50
,
PosChange
=
53
,
Set
=
54
,
...
...
@@ -157,6 +160,8 @@ namespace Percy
ReleaseRelation
=
123
,
TossCoin
=
130
,
TossDice
=
131
,
RockPaperScissors
=
132
,
HandResult
=
133
,
AnnounceRace
=
140
,
AnnounceAttrib
=
141
,
AnnounceCard
=
142
,
...
...
@@ -167,7 +172,7 @@ namespace Percy
ReloadField
=
162
,
AiName
=
163
,
ShowHint
=
164
,
PlayerHint
=
165
,
PlayerHint
=
165
,
MatchKill
=
170
,
CustomMsg
=
180
,
DuelWinner
=
200
,
...
...
@@ -1016,6 +1021,30 @@ namespace Percy
}
returnValue
=
true
;
break
;
case
GameMessage
.
SelectUnselectCard
:
player
=
move
(
1
);
int
buttonok
=
move
(
1
);
move
(
3
);
int
count1
=
move
(
1
);
for
(
int
i
=
0
;
i
<
count1
;
i
++)
{
int
code
=
currentReader
.
ReadInt32
();
int
p
=
currentReader
.
ReadByte
();
currentWriter
.
Write
(((
int
)(
p
==
player
?
code
:
0
)));
currentWriter
.
Write
((
byte
)
p
);
move
(
3
);
}
int
count2
=
move
(
1
);
for
(
int
i
=
0
;
i
<
count2
;
i
++)
{
int
code
=
currentReader
.
ReadInt32
();
int
p
=
currentReader
.
ReadByte
();
//currentWriter.Write(((int)(p == player ? code : 0)));
//currentWriter.Write((byte)p);
move
(
3
);
}
returnValue
=
true
;
break
;
case
GameMessage
.
SelectChain
:
move
(
1
);
count
=
move
(
1
);
...
...
Assets/Plugins/System.Servicemodel.Faltexception.dll
View file @
61c70af7
No preview for this file type
Assets/Plugins/System.Servicemodel.Faltexception.dll.meta
View file @
61c70af7
...
...
@@ -3,18 +3,32 @@ guid: 73132aa60cb2f2a4fb89f09c6777b7f5
timeCreated: 1476610278
licenseType: Pro
PluginImporter:
serializedVersion:
1
serializedVersion:
2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Any:
second:
enabled: 1
settings: {}
Editor:
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
61c70af7
...
...
@@ -3373,6 +3373,68 @@ public class Ocgcore : ServantWithCardDescription
gameField
.
setHint
(
InterString
.
Get
(
"请选择卡片。"
)
+
" "
+
ES_min
.
ToString
()
+
"-"
+
ES_max
.
ToString
());
}
break
;
case
GameMessage
.
SelectUnselectCard
:
if
(
inIgnoranceReplay
()
||
inTheWorld
())
{
break
;
}
if
(
condition
==
Condition
.
record
)
{
Sleep
(
60
);
}
destroy
(
waitObject
,
0
,
false
,
true
);
player
=
localPlayer
(
r
.
ReadByte
());
bool
finish
=
(
r
.
ReadByte
()
!=
0
);
cancalable
=
(
r
.
ReadByte
()
!=
0
);
ES_min
=
r
.
ReadByte
();
ES_max
=
r
.
ReadByte
();
ES_min
=
1
;
// SelectUnselectCard can actually always select 1 card
ES_max
=
1
;
// SelectUnselectCard can actually always select 1 card
ES_level
=
0
;
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
code
=
r
.
ReadInt32
();
gps
=
r
.
ReadGPS
();
card
=
GCS_cardGet
(
gps
,
false
);
if
(
card
!=
null
)
{
card
.
set_code
(
code
);
card
.
prefered
=
true
;
card
.
forSelect
=
true
;
card
.
selectPtr
=
i
;
allCardsInSelectMessage
.
Add
(
card
);
}
}
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
code
=
r
.
ReadInt32
();
gps
=
r
.
ReadGPS
();
/*card = GCS_cardGet(gps, false);
if (card != null)
{
card.set_code(code);
card.prefered = true;
card.forSelect = true;
card.selectPtr = i;
allCardsInSelectMessage.Add(card);
}*/
}
if
(
cancalable
)
{
gameInfo
.
addHashedButton
(
"cancleSelected"
,
-
1
,
superButtonType
.
no
,
InterString
.
Get
(
"取消选择@ui"
));
}
realizeCardsForSelect
();
if
(
ES_selectHint
!=
""
)
{
gameField
.
setHint
(
ES_selectHint
+
" "
+
ES_min
.
ToString
()
+
"-"
+
ES_max
.
ToString
());
}
else
{
gameField
.
setHint
(
InterString
.
Get
(
"请选择卡片。"
)
+
" "
+
ES_min
.
ToString
()
+
"-"
+
ES_max
.
ToString
());
}
break
;
case
GameMessage
.
SelectChain
:
if
(
inIgnoranceReplay
()
||
inTheWorld
())
{
...
...
@@ -5542,6 +5604,7 @@ public class Ocgcore : ServantWithCardDescription
}
break
;
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselectCard
:
if
(
cardsSelectable
.
Count
<=
ES_min
)
{
autoSendCards
();
...
...
@@ -5713,6 +5776,18 @@ public class Ocgcore : ServantWithCardDescription
real_send
=
true
;
}
}
if
(
currentMessage
==
GameMessage
.
SelectUnselectCard
)
{
if
(
cardsSelected
.
Count
>=
ES_min
)
{
sendable
=
true
;
}
if
(
cardsSelected
.
Count
==
ES_max
||
cardsSelected
.
Count
==
cardsSelectable
.
Count
)
{
sendable
=
true
;
real_send
=
true
;
}
}
if
(
currentMessage
==
GameMessage
.
SelectTribute
)
{
int
all
=
0
;
...
...
@@ -5771,7 +5846,7 @@ public class Ocgcore : ServantWithCardDescription
private
void
getSelectableCards
()
{
if
(
currentMessage
==
GameMessage
.
SelectCard
)
if
(
currentMessage
==
GameMessage
.
SelectCard
||
currentMessage
==
GameMessage
.
SelectUnselectCard
)
{
for
(
int
i
=
0
;
i
<
allCardsInSelectMessage
.
Count
;
i
++)
{
...
...
@@ -6080,6 +6155,7 @@ public class Ocgcore : ServantWithCardDescription
switch
(
currentMessage
)
{
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselectCard
:
case
GameMessage
.
SelectTribute
:
int
c
=
ES_min
;
if
(
cardsSelectable
.
Count
<
c
)
...
...
@@ -6119,6 +6195,7 @@ public class Ocgcore : ServantWithCardDescription
switch
(
currentMessage
)
{
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselectCard
:
case
GameMessage
.
SelectTribute
:
case
GameMessage
.
SelectSum
:
m
=
new
BinaryMaster
();
...
...
@@ -8108,6 +8185,8 @@ public class Ocgcore : ServantWithCardDescription
break
;
case
GameMessage
.
SelectCard
:
break
;
case
GameMessage
.
SelectUnselectCard
:
break
;
case
GameMessage
.
SelectChain
:
break
;
case
GameMessage
.
SelectPlace
:
...
...
@@ -8178,6 +8257,7 @@ public class Ocgcore : ServantWithCardDescription
case
GameMessage
.
SelectEffectYn
:
case
GameMessage
.
SelectYesNo
:
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselectCard
:
case
GameMessage
.
SelectTribute
:
case
GameMessage
.
SelectChain
:
clearAllShowedB
=
true
;
...
...
@@ -8356,6 +8436,7 @@ public class Ocgcore : ServantWithCardDescription
}
break
;
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselectCard
:
case
GameMessage
.
SelectTribute
:
case
GameMessage
.
SelectSum
:
if
(
card
.
forSelect
)
...
...
Assets/YGOSharp/Enums/GameMessage.cs
View file @
61c70af7
...
...
@@ -25,6 +25,7 @@
SelectSum
=
23
,
SelectDisfield
=
24
,
SortCard
=
25
,
SelectUnselectCard
=
26
,
ConfirmDecktop
=
30
,
ConfirmCards
=
31
,
ShuffleDeck
=
32
,
...
...
@@ -34,8 +35,10 @@
ShuffleSetCard
=
36
,
ReverseDeck
=
37
,
DeckTop
=
38
,
ShuffleExtra
=
39
,
NewTurn
=
40
,
NewPhase
=
41
,
ConfirmExtratop
=
42
,
Move
=
50
,
PosChange
=
53
,
Set
=
54
,
...
...
@@ -79,6 +82,8 @@
ReleaseRelation
=
123
,
TossCoin
=
130
,
TossDice
=
131
,
RockPaperScissors
=
132
,
HandResult
=
133
,
AnnounceRace
=
140
,
AnnounceAttrib
=
141
,
AnnounceCard
=
142
,
...
...
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