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
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
ygopro2
Commits
ffb143dc
Commit
ffb143dc
authored
Apr 06, 2019
by
mercury233
Committed by
Unicorn369
Apr 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor enums
parent
d8033b10
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
513 additions
and
1280 deletions
+513
-1280
Assets/SibylSystem/Book/Book.cs
Assets/SibylSystem/Book/Book.cs
+10
-9
Assets/SibylSystem/CardDescription/CardDescription.cs
Assets/SibylSystem/CardDescription/CardDescription.cs
+7
-6
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
+51
-51
Assets/SibylSystem/MonoHelpers/UIHelper.cs
Assets/SibylSystem/MonoHelpers/UIHelper.cs
+18
-16
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
+53
-52
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
+20
-19
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
+8
-7
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+237
-237
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
+14
-13
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+3
-2
Assets/SibylSystem/Room/Room.cs
Assets/SibylSystem/Room/Room.cs
+10
-9
Assets/SibylSystem/Room/RoomList.cs
Assets/SibylSystem/Room/RoomList.cs
+0
-5
Assets/SibylSystem/SelectDeck/selectDeck.cs
Assets/SibylSystem/SelectDeck/selectDeck.cs
+12
-10
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+17
-17
Assets/YGOSharp/CardsManager.cs
Assets/YGOSharp/CardsManager.cs
+20
-19
Assets/YGOSharp/Enums/CardAttribute.cs
Assets/YGOSharp/Enums/CardAttribute.cs
+1
-1
Assets/YGOSharp/Enums/CardLocation.cs
Assets/YGOSharp/Enums/CardLocation.cs
+4
-1
Assets/old/UiverseAssests/UNIVERSE_FILES.meta
Assets/old/UiverseAssests/UNIVERSE_FILES.meta
+0
-9
Assets/old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs
Assets/old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs
+0
-357
Assets/old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs.meta
...old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs.meta
+0
-12
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs
+0
-6
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs.meta
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs.meta
+0
-12
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs
+0
-299
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs.meta
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs.meta
+0
-12
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs
+0
-59
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs.meta
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs.meta
+0
-12
Assets/old/UiverseAssests/loader/card_string_helper.cs
Assets/old/UiverseAssests/loader/card_string_helper.cs
+28
-28
No files found.
Assets/SibylSystem/Book/Book.cs
View file @
ffb143dc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
Book
:
WindowServant2D
public
class
Book
:
WindowServant2D
{
{
...
@@ -102,15 +103,15 @@ public class Book : WindowServant2D
...
@@ -102,15 +103,15 @@ public class Book : WindowServant2D
}
}
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
{
{
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
s
earch
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
S
earch
)
{
{
continue
;
continue
;
}
}
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Unknown
)
{
{
continue
;
continue
;
}
}
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_DECK
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Deck
)
{
{
continue
;
continue
;
}
}
...
@@ -132,7 +133,7 @@ public class Book : WindowServant2D
...
@@ -132,7 +133,7 @@ public class Book : WindowServant2D
master
=
new
MultiStringMaster
();
master
=
new
MultiStringMaster
();
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
{
{
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
s
earch
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
S
earch
)
{
{
continue
;
continue
;
}
}
...
@@ -169,11 +170,11 @@ public class Book : WindowServant2D
...
@@ -169,11 +170,11 @@ public class Book : WindowServant2D
bool
died
=
false
;
bool
died
=
false
;
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
cards
)
{
{
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
s
earch
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
S
earch
)
{
{
continue
;
continue
;
}
}
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Unknown
)
{
{
continue
;
continue
;
}
}
...
@@ -181,15 +182,15 @@ public class Book : WindowServant2D
...
@@ -181,15 +182,15 @@ public class Book : WindowServant2D
{
{
if
(
item
.
p
.
controller
==
i
)
if
(
item
.
p
.
controller
==
i
)
{
{
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_MZONE
||
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
MonsterZone
||
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
fieldCards
[
i
]++;
fieldCards
[
i
]++;
}
}
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_HAND
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Hand
)
{
{
handCards
[
i
]++;
handCards
[
i
]++;
}
}
if
(
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_GRAVE
||
item
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
if
(
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Grave
||
item
.
p
.
location
==
(
UInt32
)
CardLocation
.
Removed
)
{
{
resourceCards
[
i
]++;
resourceCards
[
i
]++;
}
}
...
...
Assets/SibylSystem/CardDescription/CardDescription.cs
View file @
ffb143dc
using
UnityEngine
;
using
UnityEngine
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
CardDescription
:
Servant
public
class
CardDescription
:
Servant
{
{
...
@@ -251,30 +252,30 @@ public class CardDescription : Servant
...
@@ -251,30 +252,30 @@ public class CardDescription : Servant
{
{
if
(
gps
.
controller
==
0
)
if
(
gps
.
controller
==
0
)
{
{
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
myGrave
.
Add
(
curCard
);
myGrave
.
Add
(
curCard
);
}
}
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
myBanished
.
Add
(
curCard
);
myBanished
.
Add
(
curCard
);
}
}
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
myExtra
.
Add
(
curCard
);
myExtra
.
Add
(
curCard
);
}
}
}
}
else
else
{
{
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
opGrave
.
Add
(
curCard
);
opGrave
.
Add
(
curCard
);
}
}
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
opBanished
.
Add
(
curCard
);
opBanished
.
Add
(
curCard
);
}
}
if
((
gps
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
gps
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
opExtra
.
Add
(
curCard
);
opExtra
.
Add
(
curCard
);
}
}
...
...
Assets/SibylSystem/MonoHelpers/TcpHelper.cs
View file @
ffb143dc
...
@@ -105,72 +105,72 @@ public static class TcpHelper
...
@@ -105,72 +105,72 @@ public static class TcpHelper
{
{
MemoryStream
memoryStream
=
new
MemoryStream
(
datas
[
i
]);
MemoryStream
memoryStream
=
new
MemoryStream
(
datas
[
i
]);
BinaryReader
r
=
new
BinaryReader
(
memoryStream
);
BinaryReader
r
=
new
BinaryReader
(
memoryStream
);
var
ms
=
(
YGOSharp
.
Network
.
Enums
.
StocMessage
)(
r
.
ReadByte
());
var
ms
=
(
StocMessage
)(
r
.
ReadByte
());
switch
(
ms
)
switch
(
ms
)
{
{
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
GameMsg
:
case
StocMessage
.
GameMsg
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_GameMsg
(
r
);
Program
.
I
().
room
.
StocMessage_GameMsg
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
ErrorMsg
:
case
StocMessage
.
ErrorMsg
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_ErrorMsg
(
r
);
Program
.
I
().
room
.
StocMessage_ErrorMsg
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
SelectHand
:
case
StocMessage
.
SelectHand
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_SelectHand
(
r
);
Program
.
I
().
room
.
StocMessage_SelectHand
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
SelectTp
:
case
StocMessage
.
SelectTp
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_SelectTp
(
r
);
Program
.
I
().
room
.
StocMessage_SelectTp
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
HandResult
:
case
StocMessage
.
HandResult
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_HandResult
(
r
);
Program
.
I
().
room
.
StocMessage_HandResult
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
TpResult
:
case
StocMessage
.
TpResult
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_TpResult
(
r
);
Program
.
I
().
room
.
StocMessage_TpResult
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
ChangeSide
:
case
StocMessage
.
ChangeSide
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_ChangeSide
(
r
);
Program
.
I
().
room
.
StocMessage_ChangeSide
(
r
);
TcpHelper
.
SaveRecord
();
TcpHelper
.
SaveRecord
();
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
WaitingSide
:
case
StocMessage
.
WaitingSide
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_WaitingSide
(
r
);
Program
.
I
().
room
.
StocMessage_WaitingSide
(
r
);
TcpHelper
.
SaveRecord
();
TcpHelper
.
SaveRecord
();
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
CreateGame
:
case
StocMessage
.
CreateGame
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_CreateGame
(
r
);
Program
.
I
().
room
.
StocMessage_CreateGame
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
JoinGame
:
case
StocMessage
.
JoinGame
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_JoinGame
(
r
);
Program
.
I
().
room
.
StocMessage_JoinGame
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
TypeChange
:
case
StocMessage
.
TypeChange
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_TypeChange
(
r
);
Program
.
I
().
room
.
StocMessage_TypeChange
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
LeaveGame
:
case
StocMessage
.
LeaveGame
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_LeaveGame
(
r
);
Program
.
I
().
room
.
StocMessage_LeaveGame
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
DuelStart
:
case
StocMessage
.
DuelStart
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_DuelStart
(
r
);
Program
.
I
().
room
.
StocMessage_DuelStart
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
DuelEnd
:
case
StocMessage
.
DuelEnd
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_DuelEnd
(
r
);
Program
.
I
().
room
.
StocMessage_DuelEnd
(
r
);
TcpHelper
.
SaveRecord
();
TcpHelper
.
SaveRecord
();
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
Replay
:
case
StocMessage
.
Replay
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_Replay
(
r
);
Program
.
I
().
room
.
StocMessage_Replay
(
r
);
TcpHelper
.
SaveRecord
();
TcpHelper
.
SaveRecord
();
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
TimeLimit
:
case
StocMessage
.
TimeLimit
:
((
Ocgcore
)
Program
.
I
().
ocgcore
)
.
StocMessage_TimeLimit
(
r
);
Program
.
I
().
ocgcore
.
StocMessage_TimeLimit
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
Chat
:
case
StocMessage
.
Chat
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_Chat
(
r
);
Program
.
I
().
room
.
StocMessage_Chat
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
HsPlayerEnter
:
case
StocMessage
.
HsPlayerEnter
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_HsPlayerEnter
(
r
);
Program
.
I
().
room
.
StocMessage_HsPlayerEnter
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
HsPlayerChange
:
case
StocMessage
.
HsPlayerChange
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_HsPlayerChange
(
r
);
Program
.
I
().
room
.
StocMessage_HsPlayerChange
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
HsWatchChange
:
case
StocMessage
.
HsWatchChange
:
((
Room
)
Program
.
I
().
room
)
.
StocMessage_HsWatchChange
(
r
);
Program
.
I
().
room
.
StocMessage_HsWatchChange
(
r
);
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
RoomList
:
case
YGOSharp
.
Network
.
Enums
.
StocMessage
.
RoomList
:
((
Room
)
Program
.
I
().
room
).
StocMessage_RoomList
(
r
);
((
Room
)
Program
.
I
().
room
).
StocMessage_RoomList
(
r
);
...
@@ -273,21 +273,21 @@ public static class TcpHelper
...
@@ -273,21 +273,21 @@ public static class TcpHelper
deck
=
deckFor
;
deck
=
deckFor
;
Package
message
=
new
Package
();
Package
message
=
new
Package
();
message
.
Fuction
=
(
int
)
CtosMessage
.
UpdateDeck
;
message
.
Fuction
=
(
int
)
CtosMessage
.
UpdateDeck
;
message
.
Data
.
writer
.
Write
(
(
int
)
deckFor
.
Main
.
Count
+
deckFor
.
Extra
.
Count
);
message
.
Data
.
writer
.
Write
(
deckFor
.
Main
.
Count
+
deckFor
.
Extra
.
Count
);
message
.
Data
.
writer
.
Write
(
(
int
)
deckFor
.
Side
.
Count
);
message
.
Data
.
writer
.
Write
(
deckFor
.
Side
.
Count
);
for
(
int
i
=
0
;
i
<
deckFor
.
Main
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
deckFor
.
Main
.
Count
;
i
++)
{
{
message
.
Data
.
writer
.
Write
(
(
int
)
deckFor
.
Main
[
i
]);
message
.
Data
.
writer
.
Write
(
deckFor
.
Main
[
i
]);
var
c
=
YGOSharp
.
CardsManager
.
Get
(
(
int
)
deckFor
.
Main
[
i
]);
var
c
=
YGOSharp
.
CardsManager
.
Get
(
deckFor
.
Main
[
i
]);
deckStrings
.
Add
(
c
.
Name
);
deckStrings
.
Add
(
c
.
Name
);
}
}
for
(
int
i
=
0
;
i
<
deckFor
.
Extra
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
deckFor
.
Extra
.
Count
;
i
++)
{
{
message
.
Data
.
writer
.
Write
(
(
int
)
deckFor
.
Extra
[
i
]);
message
.
Data
.
writer
.
Write
(
deckFor
.
Extra
[
i
]);
}
}
for
(
int
i
=
0
;
i
<
deckFor
.
Side
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
deckFor
.
Side
.
Count
;
i
++)
{
{
message
.
Data
.
writer
.
Write
(
(
int
)
deckFor
.
Side
[
i
]);
message
.
Data
.
writer
.
Write
(
deckFor
.
Side
[
i
]);
}
}
Send
(
message
);
Send
(
message
);
}
}
...
@@ -337,7 +337,7 @@ public static class TcpHelper
...
@@ -337,7 +337,7 @@ public static class TcpHelper
message
.
Data
.
writer
.
Write
((
Int16
)
Config
.
ClientVersion
);
message
.
Data
.
writer
.
Write
((
Int16
)
Config
.
ClientVersion
);
message
.
Data
.
writer
.
Write
((
byte
)
204
);
message
.
Data
.
writer
.
Write
((
byte
)
204
);
message
.
Data
.
writer
.
Write
((
byte
)
204
);
message
.
Data
.
writer
.
Write
((
byte
)
204
);
message
.
Data
.
writer
.
Write
(
(
Int32
)
0
);
message
.
Data
.
writer
.
Write
(
0
);
message
.
Data
.
writer
.
WriteUnicode
(
psw
,
20
);
message
.
Data
.
writer
.
WriteUnicode
(
psw
,
20
);
Send
(
message
);
Send
(
message
);
}
}
...
@@ -471,12 +471,12 @@ public static class TcpHelper
...
@@ -471,12 +471,12 @@ public static class TcpHelper
i
++;
i
++;
try
try
{
{
if
(
item
.
Fuction
==
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
Start
)
if
(
item
.
Fuction
==
(
int
)
GameMessage
.
Start
)
{
{
write
=
true
;
write
=
true
;
startI
=
i
;
startI
=
i
;
}
}
if
(
item
.
Fuction
==
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
ReloadField
)
if
(
item
.
Fuction
==
(
int
)
GameMessage
.
ReloadField
)
{
{
write
=
true
;
write
=
true
;
startI
=
i
;
startI
=
i
;
...
@@ -645,7 +645,7 @@ public static class BinaryExtensions
...
@@ -645,7 +645,7 @@ public static class BinaryExtensions
a
.
controller
=
(
UInt32
)
Program
.
I
().
ocgcore
.
localPlayer
(
reader
.
ReadByte
());
a
.
controller
=
(
UInt32
)
Program
.
I
().
ocgcore
.
localPlayer
(
reader
.
ReadByte
());
a
.
location
=
reader
.
ReadByte
();
a
.
location
=
reader
.
ReadByte
();
a
.
sequence
=
reader
.
ReadByte
();
a
.
sequence
=
reader
.
ReadByte
();
a
.
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
;
a
.
position
=
(
int
)
CardPosition
.
FaceUpAttack
;
return
a
;
return
a
;
}
}
...
...
Assets/SibylSystem/MonoHelpers/UIHelper.cs
View file @
ffb143dc
...
@@ -4,6 +4,8 @@ using System.Collections.Generic;
...
@@ -4,6 +4,8 @@ using System.Collections.Generic;
using
System.IO
;
using
System.IO
;
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
static
class
UIHelper
public
static
class
UIHelper
{
{
[
DllImport
(
"user32"
)]
[
DllImport
(
"user32"
)]
...
@@ -980,31 +982,31 @@ public static class UIHelper
...
@@ -980,31 +982,31 @@ public static class UIHelper
{
{
res
+=
InterString
.
Get
(
"对方"
);
res
+=
InterString
.
Get
(
"对方"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"卡组"
);
res
+=
InterString
.
Get
(
"卡组"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"额外"
);
res
+=
InterString
.
Get
(
"额外"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"墓地"
);
res
+=
InterString
.
Get
(
"墓地"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"手牌"
);
res
+=
InterString
.
Get
(
"手牌"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"前场"
);
res
+=
InterString
.
Get
(
"前场"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"除外"
);
res
+=
InterString
.
Get
(
"除外"
);
}
}
if
((
p1
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
p1
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
res
+=
InterString
.
Get
(
"后场"
);
res
+=
InterString
.
Get
(
"后场"
);
}
}
...
@@ -1014,41 +1016,41 @@ public static class UIHelper
...
@@ -1014,41 +1016,41 @@ public static class UIHelper
//internal static string getGPSstringPosition(GPS p1)
//internal static string getGPSstringPosition(GPS p1)
//{
//{
// string res = "";
// string res = "";
// if ((p1.location & (UInt32)
game_location.LOCATION_OVERLAY
) > 0)
// if ((p1.location & (UInt32)
CardLocation.Overlay
) > 0)
// {
// {
// res += InterString.Get("(被叠放)");
// res += InterString.Get("(被叠放)");
// }
// }
// else
// else
// {
// {
// if ((p1.position & (UInt32)
game_position.POS_FACEUP_ATTACK
) > 0)
// if ((p1.position & (UInt32)
CardPosition.FaceUpAttack
) > 0)
// {
// {
// res += InterString.Get("(表侧攻击)");
// res += InterString.Get("(表侧攻击)");
// }
// }
// else if ((p1.position & (UInt32)
game_position.POS_FACEUP
_DEFENSE) > 0)
// else if ((p1.position & (UInt32)
CardPosition.FaceUp
_DEFENSE) > 0)
// {
// {
// res += InterString.Get("(表侧防御)");
// res += InterString.Get("(表侧防御)");
// }
// }
// else if ((p1.position & (UInt32)
game_position.POS_FACEDOWN_ATTACK
) > 0)
// else if ((p1.position & (UInt32)
CardPosition.FaceDownAttack
) > 0)
// {
// {
// res += InterString.Get("(里侧攻击)");
// res += InterString.Get("(里侧攻击)");
// }
// }
// else if ((p1.position & (UInt32)
game_position.POS_FACEDOWN
_DEFENSE) > 0)
// else if ((p1.position & (UInt32)
CardPosition.FaceDown
_DEFENSE) > 0)
// {
// {
// res += InterString.Get("(里侧防御)");
// res += InterString.Get("(里侧防御)");
// }
// }
// else if ((p1.position & (UInt32)
game_position.POS_ATTACK
) > 0)
// else if ((p1.position & (UInt32)
CardPosition.Attack
) > 0)
// {
// {
// res += InterString.Get("(攻击)");
// res += InterString.Get("(攻击)");
// }
// }
// else if ((p1.position & (UInt32)
game_p
osition.POS_DEFENSE) > 0)
// else if ((p1.position & (UInt32)
CardP
osition.POS_DEFENSE) > 0)
// {
// {
// res += InterString.Get("(防御)");
// res += InterString.Get("(防御)");
// }
// }
// else if ((p1.position & (UInt32)
game_position.POS_FACEUP
) > 0)
// else if ((p1.position & (UInt32)
CardPosition.FaceUp
) > 0)
// {
// {
// res += InterString.Get("(表侧)");
// res += InterString.Get("(表侧)");
// }
// }
// else if ((p1.position & (UInt32)
game_p
osition.POS_DEFENSE) > 0)
// else if ((p1.position & (UInt32)
CardP
osition.POS_DEFENSE) > 0)
// {
// {
// res += InterString.Get("(里侧)");
// res += InterString.Get("(里侧)");
// }
// }
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
ffb143dc
...
@@ -3,6 +3,7 @@ using System.Collections;
...
@@ -3,6 +3,7 @@ using System.Collections;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
enum
gameCardCondition
public
enum
gameCardCondition
{
{
...
@@ -288,7 +289,7 @@ public class gameCard : OCGobject
...
@@ -288,7 +289,7 @@ public class gameCard : OCGobject
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
5
));
Vector3
worldposition
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
-
5
));
obj_number
.
transform
.
position
=
worldposition
;
obj_number
.
transform
.
position
=
worldposition
;
}
}
if
(
disabled
==
true
&&
(((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
||
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)))
if
(
disabled
==
true
&&
(((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
||
((
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)))
{
{
if
(
nagaSign
==
null
)
if
(
nagaSign
==
null
)
{
{
...
@@ -566,7 +567,7 @@ public class gameCard : OCGobject
...
@@ -566,7 +567,7 @@ public class gameCard : OCGobject
if
(
opMonsterWithBackGroundCard
)
if
(
opMonsterWithBackGroundCard
)
{
{
Vector3
vector_of_begin
=
Vector3
.
zero
;
Vector3
vector_of_begin
=
Vector3
.
zero
;
if
((
p
.
position
&
(
UInt32
)
game_position
.
POS_ATTACK
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
{
{
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
0
,
-
2f
);
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
0
,
-
2f
);
}
}
...
@@ -598,7 +599,7 @@ public class gameCard : OCGobject
...
@@ -598,7 +599,7 @@ public class gameCard : OCGobject
if
(
VerticleCollider
==
null
)
if
(
VerticleCollider
==
null
)
{
{
Vector3
vector_of_begin
;
Vector3
vector_of_begin
;
if
((
p
.
position
&
(
UInt32
)
game_position
.
POS_ATTACK
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
{
{
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
0
,
2
);
vector_of_begin
=
gameObject_face
.
transform
.
position
+
new
Vector3
(
0
,
0
,
2
);
}
}
...
@@ -772,13 +773,13 @@ public class gameCard : OCGobject
...
@@ -772,13 +773,13 @@ public class gameCard : OCGobject
{
{
TweenTo
(
gived_position
,
gived_rotation
);
TweenTo
(
gived_position
,
gived_rotation
);
if
(
if
(
Program
.
I
().
ocgcore
.
currentMessage
==
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
Move
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Move
||
||
Program
.
I
().
ocgcore
.
currentMessage
==
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
Swap
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
Swap
||
||
Program
.
I
().
ocgcore
.
currentMessage
==
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
PosChange
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
PosChange
||
||
Program
.
I
().
ocgcore
.
currentMessage
==
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
FlipSummoning
Program
.
I
().
ocgcore
.
currentMessage
==
GameMessage
.
FlipSummoning
)
)
{
{
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
30f
*
time
));
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
30f
*
time
));
...
@@ -910,11 +911,11 @@ public class gameCard : OCGobject
...
@@ -910,11 +911,11 @@ public class gameCard : OCGobject
private
void
UA_reloadCardHintPosition
()
private
void
UA_reloadCardHintPosition
()
{
{
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
(
p
.
controller
==
0
)
if
(
p
.
controller
==
0
)
{
{
if
((
p
.
position
&
(
UInt32
)
game_position
.
POS_ATTACK
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
{
{
cardHint
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
2.5f
);
cardHint
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
-
2.5f
);
cardHint
.
gameObject
.
transform
.
localEulerAngles
=
new
Vector3
(
60
,
0
,
0
);
cardHint
.
gameObject
.
transform
.
localEulerAngles
=
new
Vector3
(
60
,
0
,
0
);
...
@@ -927,7 +928,7 @@ public class gameCard : OCGobject
...
@@ -927,7 +928,7 @@ public class gameCard : OCGobject
}
}
else
else
{
{
if
((
p
.
position
&
(
UInt32
)
game_position
.
POS_ATTACK
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
Attack
)
>
0
)
{
{
cardHint
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
2.5f
);
cardHint
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
0
,
2.5f
);
cardHint
.
gameObject
.
transform
.
localEulerAngles
=
new
Vector3
(
40
,
180
,
0
);
cardHint
.
gameObject
.
transform
.
localEulerAngles
=
new
Vector3
(
40
,
180
,
0
);
...
@@ -1036,35 +1037,35 @@ public class gameCard : OCGobject
...
@@ -1036,35 +1037,35 @@ public class gameCard : OCGobject
loaded_controller
=
(
int
)
p
.
controller
;
loaded_controller
=
(
int
)
p
.
controller
;
loaded_location
=
(
int
)
p
.
location
;
loaded_location
=
(
int
)
p
.
location
;
set_text
(
""
);
set_text
(
""
);
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
set_text
(
GameStringHelper
.
kazu
);
set_text
(
GameStringHelper
.
kazu
);
}
}
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
set_text
(
GameStringHelper
.
ewai
);
set_text
(
GameStringHelper
.
ewai
);
}
}
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
set_text
(
GameStringHelper
.
mudi
);
set_text
(
GameStringHelper
.
mudi
);
}
}
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
(
p
.
controller
==
0
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
set_text
(
GameStringHelper
.
chuwai
);
set_text
(
GameStringHelper
.
chuwai
);
}
}
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
set_text
(
"<#ff8888>"
+
GameStringHelper
.
kazu
+
"</color>"
);
set_text
(
"<#ff8888>"
+
GameStringHelper
.
kazu
+
"</color>"
);
}
}
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
set_text
(
"<#ff8888>"
+
GameStringHelper
.
ewai
+
"</color>"
);
set_text
(
"<#ff8888>"
+
GameStringHelper
.
ewai
+
"</color>"
);
}
}
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
set_text
(
"<#ff8888>"
+
GameStringHelper
.
mudi
+
"</color>"
);
set_text
(
"<#ff8888>"
+
GameStringHelper
.
mudi
+
"</color>"
);
}
}
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
(
p
.
controller
==
1
&&
(
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
set_text
(
"<#ff8888>"
+
GameStringHelper
.
chuwai
+
"</color>"
);
set_text
(
"<#ff8888>"
+
GameStringHelper
.
chuwai
+
"</color>"
);
}
}
...
@@ -1097,7 +1098,7 @@ public class gameCard : OCGobject
...
@@ -1097,7 +1098,7 @@ public class gameCard : OCGobject
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject
.
transform
.
position
);
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
gameObject
.
transform
.
position
);
game_object_monster_cloude
.
transform
.
position
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
+
3
));
game_object_monster_cloude
.
transform
.
position
=
Camera
.
main
.
ScreenToWorldPoint
(
new
Vector3
(
screenposition
.
x
,
screenposition
.
y
,
screenposition
.
z
+
3
));
game_object_monster_cloude_ParticleSystem
.
startSize
=
UnityEngine
.
Random
.
Range
(
3f
,
3f
+
(
20f
-
3f
)
*
(
float
)(
Mathf
.
Clamp
(
data
.
Attack
,
0
,
3000
))
/
3000f
);
game_object_monster_cloude_ParticleSystem
.
startSize
=
UnityEngine
.
Random
.
Range
(
3f
,
3f
+
(
20f
-
3f
)
*
(
float
)(
Mathf
.
Clamp
(
data
.
Attack
,
0
,
3000
))
/
3000f
);
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Earth
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1105,7 +1106,7 @@ public class gameCard : OCGobject
...
@@ -1105,7 +1106,7 @@ public class gameCard : OCGobject
80f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
80f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Water
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1113,7 +1114,7 @@ public class gameCard : OCGobject
...
@@ -1113,7 +1114,7 @@ public class gameCard : OCGobject
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
255f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Fire
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1121,7 +1122,7 @@ public class gameCard : OCGobject
...
@@ -1121,7 +1122,7 @@ public class gameCard : OCGobject
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Wind
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1129,7 +1130,7 @@ public class gameCard : OCGobject
...
@@ -1129,7 +1130,7 @@ public class gameCard : OCGobject
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Dark
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1137,7 +1138,7 @@ public class gameCard : OCGobject
...
@@ -1137,7 +1138,7 @@ public class gameCard : OCGobject
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
158f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Light
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1145,7 +1146,7 @@ public class gameCard : OCGobject
...
@@ -1145,7 +1146,7 @@ public class gameCard : OCGobject
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
140f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
),
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
0f
/
255f
+
UnityEngine
.
Random
.
Range
(-
0.2f
,
0.2f
));
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DEVINE
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Divine
))
{
{
game_object_monster_cloude_ParticleSystem
.
startColor
=
game_object_monster_cloude_ParticleSystem
.
startColor
=
new
Color
(
new
Color
(
...
@@ -1274,16 +1275,16 @@ public class gameCard : OCGobject
...
@@ -1274,16 +1275,16 @@ public class gameCard : OCGobject
int
color
=
0
;
int
color
=
0
;
if
((
data
.
Type
&
(
int
)
game_type
.
TYPE_TUNER
)
>
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
Tuner
)
>
0
)
{
{
color
=
1
;
color
=
1
;
}
}
if
((
data
.
Type
&
(
int
)
game_type
.
TYPE_XYZ
)
>
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
Xyz
)
>
0
)
{
{
color
=
2
;
color
=
2
;
}
}
if
((
data
.
Type
&
(
int
)
game_type
.
l
ink
)
>
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
L
ink
)
>
0
)
{
{
color
=
3
;
color
=
3
;
data
.
Level
=
0
;
data
.
Level
=
0
;
...
@@ -1365,7 +1366,7 @@ public class gameCard : OCGobject
...
@@ -1365,7 +1366,7 @@ public class gameCard : OCGobject
loaded_verticaldef
=
data
.
Defense
;
loaded_verticaldef
=
data
.
Defense
;
loaded_verticalpos
=
p
.
position
;
loaded_verticalpos
=
p
.
position
;
loaded_verticalcon
=
(
int
)
p
.
controller
;
loaded_verticalcon
=
(
int
)
p
.
controller
;
if
((
data
.
Type
&(
uint
)
game_type
.
l
ink
)>
0
)
if
((
data
.
Type
&(
uint
)
CardType
.
L
ink
)>
0
)
{
{
string
raw
=
""
;
string
raw
=
""
;
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
...
@@ -1391,7 +1392,7 @@ public class gameCard : OCGobject
...
@@ -1391,7 +1392,7 @@ public class gameCard : OCGobject
{
{
string
raw
=
""
;
string
raw
=
""
;
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
YGOSharp
.
Card
data_raw
=
YGOSharp
.
CardsManager
.
Get
(
data
.
Id
);
if
((
loaded_verticalpos
&
(
int
)
game_position
.
POS_ATTACK
)
>
0
)
if
((
loaded_verticalpos
&
(
int
)
CardPosition
.
Attack
)
>
0
)
{
{
if
(
data
.
Attack
>
data_raw
.
Attack
)
if
(
data
.
Attack
>
data_raw
.
Attack
)
{
{
...
@@ -1458,7 +1459,7 @@ public class gameCard : OCGobject
...
@@ -1458,7 +1459,7 @@ public class gameCard : OCGobject
//{
//{
// if (condition== gameCardCondition.verticle_clickable)
// if (condition== gameCardCondition.verticle_clickable)
// {
// {
// if ((p.position & (UInt32)
game_position.POS_ATTACK
) > 0)
// if ((p.position & (UInt32)
CardPosition.Attack
) > 0)
// {
// {
// ability = data.Attack;
// ability = data.Attack;
// }
// }
...
@@ -1588,16 +1589,16 @@ public class gameCard : OCGobject
...
@@ -1588,16 +1589,16 @@ public class gameCard : OCGobject
}
}
}
}
int
special_hint
=
0
;
int
special_hint
=
0
;
if
((
p
.
position
&
(
int
)
game_position
.
POS_FACEDOWN
)
>
0
)
if
((
p
.
position
&
(
int
)
CardPosition
.
FaceDown
)
>
0
)
{
{
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Removed
)
>
0
)
{
{
special_hint
=
1
;
special_hint
=
1
;
}
}
}
}
if
((
p
.
position
&
(
int
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
p
.
position
&
(
int
)
CardPosition
.
FaceUp
)
>
0
)
{
{
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Extra
)
>
0
)
{
{
special_hint
=
2
;
special_hint
=
2
;
}
}
...
@@ -1657,19 +1658,19 @@ public class gameCard : OCGobject
...
@@ -1657,19 +1658,19 @@ public class gameCard : OCGobject
public
bool
isHided
()
public
bool
isHided
()
{
{
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Deck
)
>
0
)
{
{
return
true
;
return
true
;
}
}
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Extra
)
>
0
)
{
{
return
true
;
return
true
;
}
}
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Removed
)
>
0
)
{
{
return
true
;
return
true
;
}
}
if
((
p
.
location
&
(
int
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
p
.
location
&
(
int
)
CardLocation
.
Grave
)
>
0
)
{
{
return
true
;
return
true
;
}
}
...
@@ -1686,31 +1687,31 @@ public class gameCard : OCGobject
...
@@ -1686,31 +1687,31 @@ public class gameCard : OCGobject
{
{
int
re
=
0
;
int
re
=
0
;
//
//
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Earth
))
{
{
re
=
0
;
re
=
0
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Water
))
{
{
re
=
3
;
re
=
3
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Fire
))
{
{
re
=
5
;
re
=
5
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Wind
))
{
{
re
=
2
;
re
=
2
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Dark
))
{
{
re
=
4
;
re
=
4
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Light
))
{
{
re
=
1
;
re
=
1
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DEVINE
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Divine
))
{
{
re
=
1
;
re
=
1
;
}
}
...
@@ -1936,27 +1937,27 @@ public class gameCard : OCGobject
...
@@ -1936,27 +1937,27 @@ public class gameCard : OCGobject
public
void
add_one_overlay_light
()
public
void
add_one_overlay_light
()
{
{
GameObject
mod
=
Program
.
I
().
mod_ocgcore_ol_light
;
GameObject
mod
=
Program
.
I
().
mod_ocgcore_ol_light
;
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Earth
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_earth
;
mod
=
Program
.
I
().
mod_ocgcore_ol_earth
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Water
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_water
;
mod
=
Program
.
I
().
mod_ocgcore_ol_water
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Fire
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_fire
;
mod
=
Program
.
I
().
mod_ocgcore_ol_fire
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Wind
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_wind
;
mod
=
Program
.
I
().
mod_ocgcore_ol_wind
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Dark
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_dark
;
mod
=
Program
.
I
().
mod_ocgcore_ol_dark
;
}
}
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
GameStringHelper
.
differ
(
data
.
Attribute
,
(
long
)
CardAttribute
.
Light
))
{
{
mod
=
Program
.
I
().
mod_ocgcore_ol_light
;
mod
=
Program
.
I
().
mod_ocgcore_ol_light
;
}
}
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
View file @
ffb143dc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
GameField
:
OCGobject
public
class
GameField
:
OCGobject
{
{
...
@@ -90,14 +91,14 @@ public class GameField : OCGobject
...
@@ -90,14 +91,14 @@ public class GameField : OCGobject
Program
.
I
().
ocgcore
.
AddUpdateAction_s
(
Update
);
Program
.
I
().
ocgcore
.
AddUpdateAction_s
(
Update
);
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_DECK
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Deck
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_EXTRA
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Extra
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_GRAVE
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Grave
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_REMOVED
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Removed
,
0
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_DECK
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Deck
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_EXTRA
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Extra
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_GRAVE
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Grave
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
game_location
.
LOCATION_REMOVED
,
1
));
gameHiddenButtons
.
Add
(
new
gameHiddenButton
(
CardLocation
.
Removed
,
1
));
LOCATION_DECK_0
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
)).
GetComponent
<
TMPro
.
TextMeshPro
>();
LOCATION_DECK_0
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
)).
GetComponent
<
TMPro
.
TextMeshPro
>();
LOCATION_EXTRA_0
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
)).
GetComponent
<
TMPro
.
TextMeshPro
>();
LOCATION_EXTRA_0
=
create
(
Program
.
I
().
new_ui_textMesh
,
Vector3
.
zero
,
new
Vector3
(
60
,
0
,
0
)).
GetComponent
<
TMPro
.
TextMeshPro
>();
...
@@ -260,15 +261,15 @@ public class GameField : OCGobject
...
@@ -260,15 +261,15 @@ public class GameField : OCGobject
rightT
.
transform
.
localScale
=
new
Vector3
(
1f
/
Program
.
fieldSize
,
1f
/
Program
.
fieldSize
,
1f
/
Program
.
fieldSize
);
rightT
.
transform
.
localScale
=
new
Vector3
(
1f
/
Program
.
fieldSize
,
1f
/
Program
.
fieldSize
,
1f
/
Program
.
fieldSize
);
rightT
.
transform
.
localPosition
=
new
Vector3
(((
1f
-
1f
/
Program
.
fieldSize
)
*
(
float
)(
rightT
.
width
))
/
3.5f
,
0
,
0
);
rightT
.
transform
.
localPosition
=
new
Vector3
(((
1f
-
1f
/
Program
.
fieldSize
)
*
(
float
)(
rightT
.
width
))
/
3.5f
,
0
,
0
);
relocateTextMesh
(
LOCATION_DECK_0
,
0
,
game_location
.
LOCATION_DECK
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_DECK_0
,
0
,
CardLocation
.
Deck
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_EXTRA_0
,
0
,
game_location
.
LOCATION_EXTRA
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_EXTRA_0
,
0
,
CardLocation
.
Extra
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_REMOVED_0
,
0
,
game_location
.
LOCATION_REMOVED
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_REMOVED_0
,
0
,
CardLocation
.
Removed
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_GRAVE_0
,
0
,
game_location
.
LOCATION_GRAVE
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_GRAVE_0
,
0
,
CardLocation
.
Grave
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_DECK_1
,
1
,
game_location
.
LOCATION_DECK
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_DECK_1
,
1
,
CardLocation
.
Deck
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_EXTRA_1
,
1
,
game_location
.
LOCATION_EXTRA
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_EXTRA_1
,
1
,
CardLocation
.
Extra
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_REMOVED_1
,
1
,
game_location
.
LOCATION_REMOVED
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_REMOVED_1
,
1
,
CardLocation
.
Removed
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_GRAVE_1
,
1
,
game_location
.
LOCATION_GRAVE
,
new
Vector3
(
0
,
0
,
-
3f
));
relocateTextMesh
(
LOCATION_GRAVE_1
,
1
,
CardLocation
.
Grave
,
new
Vector3
(
0
,
0
,
-
3f
));
label
.
transform
.
localPosition
=
new
Vector3
(-
5f
*
(
Program
.
fieldSize
-
1
),
0
,
-
15.5f
*
Program
.
fieldSize
);
label
.
transform
.
localPosition
=
new
Vector3
(-
5f
*
(
Program
.
fieldSize
-
1
),
0
,
-
15.5f
*
Program
.
fieldSize
);
...
@@ -277,7 +278,7 @@ public class GameField : OCGobject
...
@@ -277,7 +278,7 @@ public class GameField : OCGobject
prelong
=
isLong
;
prelong
=
isLong
;
for
(
int
i
=
0
;
i
<
field_disabled_containers
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
field_disabled_containers
.
Count
;
i
++)
{
{
if
(
field_disabled_containers
[
i
].
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
field_disabled_containers
[
i
].
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
field_disabled_containers
[
i
].
p
.
controller
==
1
)
if
(
field_disabled_containers
[
i
].
p
.
controller
==
1
)
{
{
...
@@ -400,7 +401,7 @@ public class GameField : OCGobject
...
@@ -400,7 +401,7 @@ public class GameField : OCGobject
}
}
private
static
void
relocateTextMesh
(
TMPro
.
TextMeshPro
obj
,
uint
con
,
game_l
ocation
loc
,
Vector3
poi
)
private
static
void
relocateTextMesh
(
TMPro
.
TextMeshPro
obj
,
uint
con
,
CardL
ocation
loc
,
Vector3
poi
)
{
{
obj
.
transform
.
position
=
UIHelper
.
getCamGoodPosition
(
Program
.
I
().
ocgcore
.
get_point_worldposition
(
new
GPS
obj
.
transform
.
position
=
UIHelper
.
getCamGoodPosition
(
Program
.
I
().
ocgcore
.
get_point_worldposition
(
new
GPS
{
{
...
@@ -610,7 +611,7 @@ public class GameField : OCGobject
...
@@ -610,7 +611,7 @@ public class GameField : OCGobject
if
(
Program
.
I
().
ocgcore
.
MasterRule
>=
4
)
if
(
Program
.
I
().
ocgcore
.
MasterRule
>=
4
)
{
{
if
(
gps
.
location
==
(
int
)
game_location
.
LOCATION_SZONE
)
if
(
gps
.
location
==
(
int
)
CardLocation
.
SpellZone
)
{
{
if
(
gps
.
position
==
0
||
gps
.
position
==
4
)
if
(
gps
.
position
==
0
||
gps
.
position
==
4
)
{
{
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
View file @
ffb143dc
using
System
;
using
System
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
gameHiddenButton
:
OCGobject
public
class
gameHiddenButton
:
OCGobject
{
{
public
game_l
ocation
location
;
public
CardL
ocation
location
;
public
int
player
;
public
int
player
;
...
@@ -11,7 +12,7 @@ public class gameHiddenButton : OCGobject
...
@@ -11,7 +12,7 @@ public class gameHiddenButton : OCGobject
GPS
ps
;
GPS
ps
;
public
gameHiddenButton
(
game_l
ocation
l
,
int
p
)
public
gameHiddenButton
(
CardL
ocation
l
,
int
p
)
{
{
ps
=
new
GPS
();
ps
=
new
GPS
();
ps
.
controller
=
(
UInt32
)
p
;
ps
.
controller
=
(
UInt32
)
p
;
...
@@ -107,7 +108,7 @@ public class gameHiddenButton : OCGobject
...
@@ -107,7 +108,7 @@ public class gameHiddenButton : OCGobject
{
{
if
(
player
==
0
)
if
(
player
==
0
)
{
{
if
(
location
==
game_location
.
LOCATION_DECK
)
if
(
location
==
CardLocation
.
Deck
)
{
{
if
(
Program
.
I
().
book
.
lab
!=
null
)
if
(
Program
.
I
().
book
.
lab
!=
null
)
{
{
...
@@ -120,7 +121,7 @@ public class gameHiddenButton : OCGobject
...
@@ -120,7 +121,7 @@ public class gameHiddenButton : OCGobject
}
}
if
(
player
==
1
)
if
(
player
==
1
)
{
{
if
(
location
==
game_location
.
LOCATION_DECK
)
if
(
location
==
CardLocation
.
Deck
)
{
{
if
(
Program
.
I
().
book
.
labop
!=
null
)
if
(
Program
.
I
().
book
.
labop
!=
null
)
{
{
...
@@ -173,7 +174,7 @@ public class gameHiddenButton : OCGobject
...
@@ -173,7 +174,7 @@ public class gameHiddenButton : OCGobject
{
{
if
(
player
==
0
)
if
(
player
==
0
)
{
{
if
(
location
==
game_location
.
LOCATION_DECK
)
if
(
location
==
CardLocation
.
Deck
)
{
{
if
(
Program
.
I
().
book
.
lab
!=
null
)
if
(
Program
.
I
().
book
.
lab
!=
null
)
{
{
...
@@ -201,7 +202,7 @@ public class gameHiddenButton : OCGobject
...
@@ -201,7 +202,7 @@ public class gameHiddenButton : OCGobject
if
(
player
==
1
)
if
(
player
==
1
)
{
{
if
(
location
==
game_location
.
LOCATION_DECK
)
if
(
location
==
CardLocation
.
Deck
)
{
{
if
(
Program
.
I
().
book
.
labop
!=
null
)
if
(
Program
.
I
().
book
.
labop
!=
null
)
{
{
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
ffb143dc
...
@@ -77,39 +77,39 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -77,39 +77,39 @@ public class Ocgcore : ServantWithCardDescription
gameCardCondition
get_point_worldcondition
(
GPS
p
)
gameCardCondition
get_point_worldcondition
(
GPS
p
)
{
{
gameCardCondition
return_value
=
gameCardCondition
.
floating_clickable
;
gameCardCondition
return_value
=
gameCardCondition
.
floating_clickable
;
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
return_value
=
gameCardCondition
.
still_unclickable
;
return_value
=
gameCardCondition
.
still_unclickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
return_value
=
gameCardCondition
.
still_unclickable
;
return_value
=
gameCardCondition
.
still_unclickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
return_value
=
gameCardCondition
.
floating_clickable
;
return_value
=
gameCardCondition
.
floating_clickable
;
if
((
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
return_value
=
gameCardCondition
.
verticle_clickable
;
return_value
=
gameCardCondition
.
verticle_clickable
;
}
}
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
return_value
=
gameCardCondition
.
floating_clickable
;
return_value
=
gameCardCondition
.
floating_clickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
return_value
=
gameCardCondition
.
still_unclickable
;
return_value
=
gameCardCondition
.
still_unclickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
{
{
return_value
=
gameCardCondition
.
floating_clickable
;
return_value
=
gameCardCondition
.
floating_clickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
return_value
=
gameCardCondition
.
still_unclickable
;
return_value
=
gameCardCondition
.
still_unclickable
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
return_value
=
gameCardCondition
.
still_unclickable
;
return_value
=
gameCardCondition
.
still_unclickable
;
}
}
...
@@ -120,7 +120,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -120,7 +120,7 @@ public class Ocgcore : ServantWithCardDescription
{
{
Vector3
return_value
=
Vector3
.
zero
;
Vector3
return_value
=
Vector3
.
zero
;
float
real
=
(
Program
.
fieldSize
-
1
)
*
0.9f
+
1f
;
float
real
=
(
Program
.
fieldSize
-
1
)
*
0.9f
+
1f
;
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
p
.
controller
==
0
)
if
(
p
.
controller
==
0
)
{
{
...
@@ -132,7 +132,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -132,7 +132,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
return_value
.
y
+=
p
.
sequence
*
0.03f
;
return_value
.
y
+=
p
.
sequence
*
0.03f
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
if
(
p
.
controller
==
0
)
if
(
p
.
controller
==
0
)
{
{
...
@@ -144,7 +144,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -144,7 +144,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
return_value
.
y
+=
p
.
sequence
*
0.03f
;
return_value
.
y
+=
p
.
sequence
*
0.03f
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
if
(
MasterRule
>=
4
)
if
(
MasterRule
>=
4
)
{
{
...
@@ -171,7 +171,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -171,7 +171,7 @@ public class Ocgcore : ServantWithCardDescription
return_value
.
y
+=
p
.
sequence
*
0.03f
;
return_value
.
y
+=
p
.
sequence
*
0.03f
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
if
(
MasterRule
>=
4
)
if
(
MasterRule
>=
4
)
{
{
...
@@ -198,7 +198,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -198,7 +198,7 @@ public class Ocgcore : ServantWithCardDescription
return_value
.
y
+=
p
.
sequence
*
0.03f
;
return_value
.
y
+=
p
.
sequence
*
0.03f
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
UInt32
realIndex
=
p
.
sequence
;
UInt32
realIndex
=
p
.
sequence
;
if
(
p
.
controller
==
0
)
if
(
p
.
controller
==
0
)
...
@@ -252,7 +252,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -252,7 +252,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
return_value
.
x
*=
real
;
return_value
.
x
*=
real
;
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
if
(
p
.
sequence
<
5
||
((
p
.
sequence
==
6
||
p
.
sequence
==
7
)
&&
MasterRule
>=
4
))
if
(
p
.
sequence
<
5
||
((
p
.
sequence
==
6
||
p
.
sequence
==
7
)
&&
MasterRule
>=
4
))
{
{
...
@@ -367,7 +367,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -367,7 +367,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
}
}
}
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
if
(
c
!=
null
)
if
(
c
!=
null
)
{
{
...
@@ -409,10 +409,10 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -409,10 +409,10 @@ public class Ocgcore : ServantWithCardDescription
Program
.
go
(
1
,
()
=>
Program
.
go
(
1
,
()
=>
{
{
MHS_creatBundle
(
60
,
localPlayer
(
0
),
game_location
.
LOCATION_DECK
);
MHS_creatBundle
(
60
,
localPlayer
(
0
),
CardLocation
.
Deck
);
MHS_creatBundle
(
15
,
localPlayer
(
0
),
game_location
.
LOCATION_EXTRA
);
MHS_creatBundle
(
15
,
localPlayer
(
0
),
CardLocation
.
Extra
);
MHS_creatBundle
(
60
,
localPlayer
(
1
),
game_location
.
LOCATION_DECK
);
MHS_creatBundle
(
60
,
localPlayer
(
1
),
CardLocation
.
Deck
);
MHS_creatBundle
(
15
,
localPlayer
(
1
),
game_location
.
LOCATION_EXTRA
);
MHS_creatBundle
(
15
,
localPlayer
(
1
),
CardLocation
.
Extra
);
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
{
{
cards
[
i
].
hide
();
cards
[
i
].
hide
();
...
@@ -1195,7 +1195,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1195,7 +1195,7 @@ public class Ocgcore : ServantWithCardDescription
public
void
forceMSquit
()
public
void
forceMSquit
()
{
{
Package
p
=
new
Package
();
Package
p
=
new
Package
();
p
.
Fuction
=
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
sibyl_quit
;
p
.
Fuction
=
(
int
)
GameMessage
.
sibyl_quit
;
Packages
.
Add
(
p
);
Packages
.
Add
(
p
);
}
}
...
@@ -1312,7 +1312,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1312,7 +1312,7 @@ public class Ocgcore : ServantWithCardDescription
md5Maker
=
0
;
md5Maker
=
0
;
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
{
{
cards
[
i
].
p
.
location
=
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
;
cards
[
i
].
p
.
location
=
(
UInt32
)
CardLocation
.
Unknown
;
}
}
int
playertype
=
r
.
ReadByte
();
int
playertype
=
r
.
ReadByte
();
isFirst
=
((
playertype
&
0xf
)
>
0
)
?
false
:
true
;
isFirst
=
((
playertype
&
0xf
)
>
0
)
?
false
:
true
;
...
@@ -1336,10 +1336,10 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1336,10 +1336,10 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
}
cookie_matchKill
=
0
;
cookie_matchKill
=
0
;
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
0
),
game_location
.
LOCATION_DECK
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
0
),
CardLocation
.
Deck
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
0
),
game_location
.
LOCATION_EXTRA
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
0
),
CardLocation
.
Extra
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
1
),
game_location
.
LOCATION_DECK
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
1
),
CardLocation
.
Deck
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
1
),
game_location
.
LOCATION_EXTRA
);
MHS_creatBundle
(
r
.
ReadInt16
(),
localPlayer
(
1
),
CardLocation
.
Extra
);
gameField
.
clearDisabled
();
gameField
.
clearDisabled
();
if
(
Program
.
I
().
room
.
mode
==
0
)
if
(
Program
.
I
().
room
.
mode
==
0
)
{
{
...
@@ -1380,7 +1380,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1380,7 +1380,7 @@ public class Ocgcore : ServantWithCardDescription
md5Maker
=
0
;
md5Maker
=
0
;
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
cards
[
i
].
p
.
location
=
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
;
cards
[
i
].
p
.
location
=
(
UInt32
)
CardLocation
.
Unknown
;
}
}
cookie_matchKill
=
0
;
cookie_matchKill
=
0
;
...
@@ -1418,7 +1418,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1418,7 +1418,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_MZONE
,
location
=
(
UInt32
)
CardLocation
.
MonsterZone
,
position
=
(
int
)
r
.
ReadByte
(),
position
=
(
int
)
r
.
ReadByte
(),
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
...
@@ -1426,7 +1426,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1426,7 +1426,7 @@ public class Ocgcore : ServantWithCardDescription
val
=
r
.
ReadByte
();
val
=
r
.
ReadByte
();
for
(
int
xyz
=
0
;
xyz
<
val
;
++
xyz
)
for
(
int
xyz
=
0
;
xyz
<
val
;
++
xyz
)
{
{
gps
.
location
|=
(
UInt32
)
game_location
.
LOCATION_OVERLAY
;
gps
.
location
|=
(
UInt32
)
CardLocation
.
Overlay
;
gps
.
position
=
xyz
;
gps
.
position
=
xyz
;
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
}
}
...
@@ -1440,7 +1440,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1440,7 +1440,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_SZONE
,
location
=
(
UInt32
)
CardLocation
.
SpellZone
,
position
=
(
int
)
r
.
ReadByte
(),
position
=
(
int
)
r
.
ReadByte
(),
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
...
@@ -1453,8 +1453,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1453,8 +1453,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1465,8 +1465,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1465,8 +1465,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_HAND
,
location
=
(
UInt32
)
CardLocation
.
Hand
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1477,8 +1477,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1477,8 +1477,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_GRAVE
,
location
=
(
UInt32
)
CardLocation
.
Grave
,
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceUpAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1489,8 +1489,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1489,8 +1489,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_REMOVED
,
location
=
(
UInt32
)
CardLocation
.
Removed
,
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceUpAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1502,8 +1502,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1502,8 +1502,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_EXTRA
,
location
=
(
UInt32
)
CardLocation
.
Extra
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1513,8 +1513,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1513,8 +1513,8 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_EXTRA
,
location
=
(
UInt32
)
CardLocation
.
Extra
,
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceUpAttack
,
sequence
=
(
UInt32
)(
val
+
i
),
sequence
=
(
UInt32
)(
val
+
i
),
};
};
GCS_cardCreate
(
gps
);
GCS_cardCreate
(
gps
);
...
@@ -1844,7 +1844,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1844,7 +1844,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
card
.
set_code
(
code
);
card
.
set_code
(
code
);
card
.
p
.
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
;
card
.
p
.
position
=
(
int
)
CardPosition
.
FaceUpAttack
;
card
.
refreshData
();
card
.
refreshData
();
ES_hint
=
InterString
.
Get
(
"「[?]」反转召唤宣言时"
,
card
.
get_data
().
Name
);
ES_hint
=
InterString
.
Get
(
"「[?]」反转召唤宣言时"
,
card
.
get_data
().
Name
);
if
(
card
.
p
.
controller
==
0
)
if
(
card
.
p
.
controller
==
0
)
...
@@ -1901,24 +1901,24 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1901,24 +1901,24 @@ public class Ocgcore : ServantWithCardDescription
ES_hint
=
InterString
.
Get
(
"玩家抽卡时"
);
ES_hint
=
InterString
.
Get
(
"玩家抽卡时"
);
controller
=
localPlayer
(
r
.
ReadByte
());
controller
=
localPlayer
(
r
.
ReadByte
());
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
int
deckCC
=
MHS_getBundle
(
controller
,
(
int
)
game_location
.
LOCATION_DECK
).
Count
;
int
deckCC
=
MHS_getBundle
(
controller
,
(
int
)
CardLocation
.
Deck
).
Count
;
for
(
int
isa
=
0
;
isa
<
count
;
isa
++)
for
(
int
isa
=
0
;
isa
<
count
;
isa
++)
{
{
card
=
GCS_cardMove
(
card
=
GCS_cardMove
(
new
GPS
new
GPS
{
{
controller
=
(
UInt32
)
controller
,
controller
=
(
UInt32
)
controller
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
sequence
=
(
UInt32
)(
deckCC
-
1
-
isa
),
sequence
=
(
UInt32
)(
deckCC
-
1
-
isa
),
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
}
}
,
,
new
GPS
new
GPS
{
{
controller
=
(
UInt32
)
controller
,
controller
=
(
UInt32
)
controller
,
location
=
(
UInt32
)
game_location
.
LOCATION_HAND
,
location
=
(
UInt32
)
CardLocation
.
Hand
,
sequence
=
(
UInt32
)(
1000
),
sequence
=
(
UInt32
)(
1000
),
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
}
}
,
false
);
,
false
);
card
.
set_code
(
r
.
ReadInt32
()
&
0x7fffffff
);
card
.
set_code
(
r
.
ReadInt32
()
&
0x7fffffff
);
...
@@ -1958,12 +1958,12 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1958,12 +1958,12 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
}
int
mcount
=
r
.
ReadByte
();
int
mcount
=
r
.
ReadByte
();
var
cardsInDeck
=
MHS_resizeBundle
(
mcount
,
controller
,
game_location
.
LOCATION_DECK
);
var
cardsInDeck
=
MHS_resizeBundle
(
mcount
,
controller
,
CardLocation
.
Deck
);
int
ecount
=
r
.
ReadByte
();
int
ecount
=
r
.
ReadByte
();
var
cardsInExtra
=
MHS_resizeBundle
(
ecount
,
controller
,
game_location
.
LOCATION_EXTRA
);
var
cardsInExtra
=
MHS_resizeBundle
(
ecount
,
controller
,
CardLocation
.
Extra
);
int
pcount
=
r
.
ReadByte
();
int
pcount
=
r
.
ReadByte
();
int
hcount
=
r
.
ReadByte
();
int
hcount
=
r
.
ReadByte
();
var
cardsInHand
=
MHS_resizeBundle
(
hcount
,
controller
,
game_location
.
LOCATION_HAND
);
var
cardsInHand
=
MHS_resizeBundle
(
hcount
,
controller
,
CardLocation
.
Hand
);
if
(
cardsInDeck
.
Count
>
0
)
if
(
cardsInDeck
.
Count
>
0
)
{
{
cardsInDeck
[
cardsInDeck
.
Count
-
1
].
set_code
(
r
.
ReadInt32
());
cardsInDeck
[
cardsInDeck
.
Count
-
1
].
set_code
(
r
.
ReadInt32
());
...
@@ -1980,7 +1980,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1980,7 +1980,7 @@ public class Ocgcore : ServantWithCardDescription
{
{
if
(
cardsInExtra
.
Count
-
1
-
i
>
0
)
if
(
cardsInExtra
.
Count
-
1
-
i
>
0
)
{
{
cardsInExtra
[
cardsInExtra
.
Count
-
1
-
i
].
p
.
position
=
(
int
)
game_position
.
POS_FACEUP_ATTACK
;
cardsInExtra
[
cardsInExtra
.
Count
-
1
-
i
].
p
.
position
=
(
int
)
CardPosition
.
FaceUpAttack
;
}
}
}
}
if
(
controller
==
0
)
if
(
controller
==
0
)
...
@@ -2197,7 +2197,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2197,7 +2197,7 @@ public class Ocgcore : ServantWithCardDescription
case
GameMessage
.
ConfirmDecktop
:
case
GameMessage
.
ConfirmDecktop
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
int
countOfDeck
=
countLocation
(
player
,
game_location
.
LOCATION_DECK
);
int
countOfDeck
=
countLocation
(
player
,
CardLocation
.
Deck
);
for
(
int
i
=
0
;
i
<
count
;
i
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
code
=
r
.
ReadInt32
();
code
=
r
.
ReadInt32
();
...
@@ -2205,7 +2205,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2205,7 +2205,7 @@ public class Ocgcore : ServantWithCardDescription
card
=
GCS_cardGet
(
new
GPS
card
=
GCS_cardGet
(
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
sequence
=
(
UInt32
)(
countOfDeck
-
1
-
i
),
sequence
=
(
UInt32
)(
countOfDeck
-
1
-
i
),
},
false
);
},
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
...
@@ -2242,11 +2242,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2242,11 +2242,11 @@ public class Ocgcore : ServantWithCardDescription
break
;
break
;
case
GameMessage
.
DeckTop
:
case
GameMessage
.
DeckTop
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
int
countOfDeck_
=
countLocation
(
player
,
game_location
.
LOCATION_DECK
);
int
countOfDeck_
=
countLocation
(
player
,
CardLocation
.
Deck
);
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
sequence
=
(
UInt32
)(
countOfDeck_
-
1
-
r
.
ReadByte
()),
sequence
=
(
UInt32
)(
countOfDeck_
-
1
-
r
.
ReadByte
()),
};
};
code
=
r
.
ReadInt32
();
code
=
r
.
ReadInt32
();
...
@@ -2270,7 +2270,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2270,7 +2270,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
...
@@ -2283,7 +2283,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2283,7 +2283,7 @@ public class Ocgcore : ServantWithCardDescription
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
...
@@ -2298,18 +2298,18 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2298,18 +2298,18 @@ public class Ocgcore : ServantWithCardDescription
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
cards
[
i
].
p
.
location
=
(
UInt32
)
game_location
.
LOCATION_GRAVE
;
cards
[
i
].
p
.
location
=
(
UInt32
)
CardLocation
.
Grave
;
}
}
}
}
else
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
else
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
cards
[
i
].
p
.
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
;
cards
[
i
].
p
.
location
=
(
UInt32
)
CardLocation
.
Deck
;
}
}
}
}
}
}
...
@@ -2346,7 +2346,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2346,7 +2346,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
localPlayer
(
0
),
controller
=
(
UInt32
)
localPlayer
(
0
),
location
=
(
UInt32
)
game_location
.
LOCATION_MZONE
,
location
=
(
UInt32
)
CardLocation
.
MonsterZone
,
sequence
=
(
UInt32
)
i
sequence
=
(
UInt32
)
i
};
};
if
((
selectable_field
&
filter
)
>
0
)
if
((
selectable_field
&
filter
)
>
0
)
...
@@ -2364,7 +2364,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2364,7 +2364,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
localPlayer
(
0
),
controller
=
(
UInt32
)
localPlayer
(
0
),
location
=
(
UInt32
)
game_location
.
LOCATION_SZONE
,
location
=
(
UInt32
)
CardLocation
.
SpellZone
,
sequence
=
(
UInt32
)
i
sequence
=
(
UInt32
)
i
};
};
if
((
selectable_field
&
filter
)
>
0
)
if
((
selectable_field
&
filter
)
>
0
)
...
@@ -2382,7 +2382,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2382,7 +2382,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
localPlayer
(
1
),
controller
=
(
UInt32
)
localPlayer
(
1
),
location
=
(
UInt32
)
game_location
.
LOCATION_MZONE
,
location
=
(
UInt32
)
CardLocation
.
MonsterZone
,
sequence
=
(
UInt32
)
i
sequence
=
(
UInt32
)
i
};
};
if
((
selectable_field
&
filter
)
>
0
)
if
((
selectable_field
&
filter
)
>
0
)
...
@@ -2400,7 +2400,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2400,7 +2400,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
localPlayer
(
1
),
controller
=
(
UInt32
)
localPlayer
(
1
),
location
=
(
UInt32
)
game_location
.
LOCATION_SZONE
,
location
=
(
UInt32
)
CardLocation
.
SpellZone
,
sequence
=
(
UInt32
)
i
sequence
=
(
UInt32
)
i
};
};
if
((
selectable_field
&
filter
)
>
0
)
if
((
selectable_field
&
filter
)
>
0
)
...
@@ -2481,7 +2481,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2481,7 +2481,7 @@ public class Ocgcore : ServantWithCardDescription
public
Package
getNamePacket
()
public
Package
getNamePacket
()
{
{
Package
p__
=
new
Package
();
Package
p__
=
new
Package
();
p__
.
Fuction
=
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
GameMessage
.
sibyl_name
;
p__
.
Fuction
=
(
int
)
GameMessage
.
sibyl_name
;
p__
.
Data
=
new
BinaryMaster
();
p__
.
Data
=
new
BinaryMaster
();
p__
.
Data
.
writer
.
WriteUnicode
(
name_0
,
50
);
p__
.
Data
.
writer
.
WriteUnicode
(
name_0
,
50
);
p__
.
Data
.
writer
.
WriteUnicode
(
name_0_tag
,
50
);
p__
.
Data
.
writer
.
WriteUnicode
(
name_0_tag
,
50
);
...
@@ -2498,7 +2498,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2498,7 +2498,7 @@ public class Ocgcore : ServantWithCardDescription
Program
.
I
().
book
.
add
(
toPrint
);
Program
.
I
().
book
.
add
(
toPrint
);
}
}
private
int
countLocation
(
int
player
,
game_l
ocation
location_
)
private
int
countLocation
(
int
player
,
CardL
ocation
location_
)
{
{
int
re
=
0
;
int
re
=
0
;
...
@@ -2516,7 +2516,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2516,7 +2516,7 @@ public class Ocgcore : ServantWithCardDescription
return
re
;
return
re
;
}
}
private
int
countLocationSequence
(
int
player
,
game_l
ocation
location_
)
private
int
countLocationSequence
(
int
player
,
CardL
ocation
location_
)
{
{
int
re
=
0
;
int
re
=
0
;
...
@@ -2904,8 +2904,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2904,8 +2904,8 @@ public class Ocgcore : ServantWithCardDescription
card
=
GCS_cardGet
(
new
GPS
card
=
GCS_cardGet
(
new
GPS
{
{
controller
=
(
UInt32
)
0
,
controller
=
(
UInt32
)
0
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
0
,
sequence
=
(
UInt32
)
0
,
},
false
);
},
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
...
@@ -2953,8 +2953,8 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -2953,8 +2953,8 @@ public class Ocgcore : ServantWithCardDescription
card
=
GCS_cardGet
(
new
GPS
card
=
GCS_cardGet
(
new
GPS
{
{
controller
=
(
UInt32
)
0
,
controller
=
(
UInt32
)
0
,
location
=
(
UInt32
)
game_location
.
LOCATION_HAND
,
location
=
(
UInt32
)
CardLocation
.
Hand
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
0
,
sequence
=
(
UInt32
)
0
,
},
false
);
},
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
...
@@ -3903,7 +3903,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -3903,7 +3903,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
card
.
levelForSelect_2
==
0
)
if
(
card
.
levelForSelect_2
==
0
)
{
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
if
((
card
.
get_data
().
Type
&
(
int
)
game_type
.
l
ink
)
>
0
)
if
((
card
.
get_data
().
Type
&
(
int
)
CardType
.
L
ink
)
>
0
)
{
{
card
.
levelForSelect_2
=
1
;
card
.
levelForSelect_2
=
1
;
}
}
...
@@ -3930,7 +3930,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -3930,7 +3930,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
card
.
levelForSelect_2
==
0
)
if
(
card
.
levelForSelect_2
==
0
)
{
{
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
card
.
levelForSelect_2
=
card
.
levelForSelect_1
;
if
((
card
.
get_data
().
Type
&
(
int
)
game_type
.
l
ink
)
>
0
)
if
((
card
.
get_data
().
Type
&
(
int
)
CardType
.
L
ink
)
>
0
)
{
{
card
.
levelForSelect_2
=
1
;
card
.
levelForSelect_2
=
1
;
}
}
...
@@ -4172,7 +4172,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4172,7 +4172,7 @@ public class Ocgcore : ServantWithCardDescription
case
GameMessage
.
ConfirmDecktop
:
case
GameMessage
.
ConfirmDecktop
:
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
count
=
r
.
ReadByte
();
count
=
r
.
ReadByte
();
int
countOfDeck
=
countLocation
(
player
,
game_location
.
LOCATION_DECK
);
int
countOfDeck
=
countLocation
(
player
,
CardLocation
.
Deck
);
for
(
int
i
=
0
;
i
<
count
;
i
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
code
=
r
.
ReadInt32
();
code
=
r
.
ReadInt32
();
...
@@ -4180,7 +4180,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4180,7 +4180,7 @@ public class Ocgcore : ServantWithCardDescription
gps
=
new
GPS
gps
=
new
GPS
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
game_location
.
LOCATION_DECK
,
location
=
(
UInt32
)
CardLocation
.
Deck
,
sequence
=
(
UInt32
)(
countOfDeck
-
1
-
i
),
sequence
=
(
UInt32
)(
countOfDeck
-
1
-
i
),
};
};
card
=
GCS_cardGet
(
gps
,
false
);
card
=
GCS_cardGet
(
gps
,
false
);
...
@@ -4209,7 +4209,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4209,7 +4209,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
(
gps
.
location
!=
(
int
)
game_location
.
LOCATION_HAND
)
if
(
gps
.
location
!=
(
int
)
CardLocation
.
Hand
)
{
{
showC
=
true
;
showC
=
true
;
}
}
...
@@ -4230,13 +4230,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4230,13 +4230,13 @@ public class Ocgcore : ServantWithCardDescription
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
if
(
if
(
(
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
(
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
||
||
(
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
(
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
||
||
(
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
(
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
||
||
(
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
(
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
)
{
{
card
.
currentKuang
=
gameCard
.
kuangType
.
selected
;
card
.
currentKuang
=
gameCard
.
kuangType
.
selected
;
...
@@ -4252,7 +4252,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4252,7 +4252,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
if
(
card
.
condition
!=
gameCardCondition
.
verticle_clickable
)
else
if
(
card
.
condition
!=
gameCardCondition
.
verticle_clickable
)
{
{
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
{
{
if
(
i
==
0
)
if
(
i
==
0
)
{
{
...
@@ -4300,7 +4300,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4300,7 +4300,7 @@ public class Ocgcore : ServantWithCardDescription
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
...
@@ -4405,7 +4405,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4405,7 +4405,7 @@ public class Ocgcore : ServantWithCardDescription
GPS
from
=
r
.
ReadGPS
();
GPS
from
=
r
.
ReadGPS
();
GPS
to
=
r
.
ReadGPS
();
GPS
to
=
r
.
ReadGPS
();
card
=
GCS_cardGet
(
to
,
false
);
card
=
GCS_cardGet
(
to
,
false
);
if
((
to
.
location
==
((
UInt32
)
game_location
.
LOCATION_OVERLAY
|
(
UInt32
)
game_location
.
LOCATION_EXTRA
))
&&
((
from
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
&&
Program
.
I
().
setting
.
setting
.
Vxyz
.
value
==
true
)
if
((
to
.
location
==
((
UInt32
)
CardLocation
.
Overlay
|
(
UInt32
)
CardLocation
.
Extra
))
&&
((
from
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
&&
Program
.
I
().
setting
.
setting
.
Vxyz
.
value
==
true
)
{
{
Vector3
vDarkHole
=
Vector3
.
zero
;
Vector3
vDarkHole
=
Vector3
.
zero
;
float
real
=
(
Program
.
fieldSize
-
1
)
*
0.9f
+
1f
;
float
real
=
(
Program
.
fieldSize
-
1
)
*
0.9f
+
1f
;
...
@@ -4425,22 +4425,22 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4425,22 +4425,22 @@ public class Ocgcore : ServantWithCardDescription
}
}
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
if
((
to
.
position
&
(
int
)
game_position
.
POS_FACEDOWN
)
>
0
)
if
((
to
.
position
&
(
int
)
CardPosition
.
FaceDown
)
>
0
)
{
{
if
(
to
.
location
==
(
UInt32
)
game_location
.
LOCATION_MZONE
||
to
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
to
.
location
==
(
UInt32
)
CardLocation
.
MonsterZone
||
to
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vset
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vset
.
value
==
true
)
card
.
positionEffect
(
Program
.
I
().
mod_ocgcore_decoration_card_setted
);
card
.
positionEffect
(
Program
.
I
().
mod_ocgcore_decoration_card_setted
);
UIHelper
.
playSound
(
"set"
,
1f
);
UIHelper
.
playSound
(
"set"
,
1f
);
}
}
}
}
if
(
to
.
location
==
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
if
(
to
.
location
==
(
UInt32
)
CardLocation
.
Grave
)
{
{
if
((
from
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
UIHelper
.
playSound
(
"destroyed"
,
1f
);
if
((
from
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
UIHelper
.
playSound
(
"destroyed"
,
1f
);
if
(
Program
.
I
().
setting
.
setting
.
Vmove
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vmove
.
value
==
true
)
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
Program
.
I
().
mod_ocgcore_decoration_tograve
,
card
.
gameObject
.
transform
.
position
,
Quaternion
.
identity
),
5f
);
MonoBehaviour
.
Destroy
((
GameObject
)
MonoBehaviour
.
Instantiate
(
Program
.
I
().
mod_ocgcore_decoration_tograve
,
card
.
gameObject
.
transform
.
position
,
Quaternion
.
identity
),
5f
);
}
}
if
(
to
.
location
==
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
if
(
to
.
location
==
(
UInt32
)
CardLocation
.
Removed
)
{
{
UIHelper
.
playSound
(
"destroyed"
,
1f
);
UIHelper
.
playSound
(
"destroyed"
,
1f
);
if
(
Program
.
I
().
setting
.
setting
.
Vmove
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vmove
.
value
==
true
)
...
@@ -4490,21 +4490,21 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4490,21 +4490,21 @@ public class Ocgcore : ServantWithCardDescription
if
(
Program
.
I
().
setting
.
setting
.
Vspsum
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vspsum
.
value
==
true
)
{
{
GameObject
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
GameObject
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Earth
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_earth
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_earth
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Dark
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_dark
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_dark
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DEVINE
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Divine
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Fire
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_fire
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_fire
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Light
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_light
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Water
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_water
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_water
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Wind
))
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_wind
;
mod
=
Program
.
I
().
mod_ocgcore_ss_summon_wind
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_FUSION
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Fusion
))
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vfusion
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vfusion
.
value
==
true
)
{
{
...
@@ -4512,7 +4512,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4512,7 +4512,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_SYNCHRO
))
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Synchro
))
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vsync
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vsync
.
value
==
true
)
{
{
...
@@ -4521,7 +4521,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4521,7 +4521,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_RITUAL
))
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Ritual
))
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vrution
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vrution
.
value
==
true
)
{
{
...
@@ -4529,7 +4529,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4529,7 +4529,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
l
ink
))
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
L
ink
))
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vlink
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vlink
.
value
==
true
)
{
{
...
@@ -4550,15 +4550,15 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4550,15 +4550,15 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_FUSION
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Fusion
))
{
{
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_SYNCHRO
))
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Synchro
))
{
{
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
game_type
.
TYPE_RITUAL
))
else
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Type
,
(
long
)
CardType
.
Ritual
))
{
{
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
UIHelper
.
playSound
(
"specialsummon2"
,
1f
);
}
}
...
@@ -4602,32 +4602,32 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4602,32 +4602,32 @@ public class Ocgcore : ServantWithCardDescription
card
.
set_code
(
code
);
card
.
set_code
(
code
);
UIHelper
.
playSound
(
"activate"
,
1
);
UIHelper
.
playSound
(
"activate"
,
1
);
card
.
animation_show_off
(
false
);
card
.
animation_show_off
(
false
);
if
((
card
.
get_data
().
Type
&
(
int
)
game_type
.
TYPE_MONSTER
)
>
0
)
if
((
card
.
get_data
().
Type
&
(
int
)
CardType
.
Monster
)
>
0
)
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vactm
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vactm
.
value
==
true
)
{
{
GameObject
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_light
;
GameObject
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_light
;
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_EARTH
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Earth
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_earth
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_earth
;
}
}
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_WATER
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Water
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_water
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_water
;
}
}
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_FIRE
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Fire
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_fire
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_fire
;
}
}
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_WIND
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Wind
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_wind
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_wind
;
}
}
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_LIGHT
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Light
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_light
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_light
;
}
}
if
((
card
.
get_data
().
Attribute
&
(
int
)
game_attributes
.
ATTRIBUTE_DARK
)
>
0
)
if
((
card
.
get_data
().
Attribute
&
(
int
)
CardAttribute
.
Dark
)
>
0
)
{
{
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_dark
;
mod
=
Program
.
I
().
mod_ocgcore_cs_mon_dark
;
}
}
...
@@ -4635,14 +4635,14 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4635,14 +4635,14 @@ public class Ocgcore : ServantWithCardDescription
card
.
fast_decoration
(
mod
);
card
.
fast_decoration
(
mod
);
}
}
}
}
if
((
card
.
get_data
().
Type
&
(
int
)
game_type
.
TYPE_SPELL
)
>
0
)
if
((
card
.
get_data
().
Type
&
(
int
)
CardType
.
Spell
)
>
0
)
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vacts
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vacts
.
value
==
true
)
{
{
card
.
positionEffect
(
Program
.
I
().
mod_ocgcore_decoration_magic_activated
);
card
.
positionEffect
(
Program
.
I
().
mod_ocgcore_decoration_magic_activated
);
}
}
}
}
if
((
card
.
get_data
().
Type
&
(
int
)
game_type
.
TYPE_TRAP
)
>
0
)
if
((
card
.
get_data
().
Type
&
(
int
)
CardType
.
Trap
)
>
0
)
{
{
if
(
Program
.
I
().
setting
.
setting
.
Vactt
.
value
==
true
)
if
(
Program
.
I
().
setting
.
setting
.
Vactt
.
value
==
true
)
{
{
...
@@ -4728,7 +4728,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4728,7 +4728,7 @@ public class Ocgcore : ServantWithCardDescription
card
=
GCS_cardGet
(
gps
,
false
);
card
=
GCS_cardGet
(
gps
,
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
if
(
card
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
card
.
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
card
.
p
.
sequence
==
6
||
card
.
p
.
sequence
==
7
)
if
(
card
.
p
.
sequence
==
6
||
card
.
p
.
sequence
==
7
)
{
{
...
@@ -4746,9 +4746,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4746,9 +4746,9 @@ public class Ocgcore : ServantWithCardDescription
{
{
if
(
cardsInSelectAnimation
.
Count
==
2
)
if
(
cardsInSelectAnimation
.
Count
==
2
)
{
{
if
(
cardsInSelectAnimation
[
0
].
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
cardsInSelectAnimation
[
0
].
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
cardsInSelectAnimation
[
1
].
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
cardsInSelectAnimation
[
1
].
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
cardsInSelectAnimation
[
1
].
p
.
sequence
==
6
||
cardsInSelectAnimation
[
1
].
p
.
sequence
==
7
)
if
(
cardsInSelectAnimation
[
1
].
p
.
sequence
==
6
||
cardsInSelectAnimation
[
1
].
p
.
sequence
==
7
)
{
{
...
@@ -4797,11 +4797,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4797,11 +4797,11 @@ public class Ocgcore : ServantWithCardDescription
card
=
GCS_cardGet
(
gps
,
false
);
card
=
GCS_cardGet
(
gps
,
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
if
((
card
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
&&
(
card
.
p
.
sequence
==
6
||
card
.
p
.
sequence
==
7
))
if
((
card
.
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
&&
(
card
.
p
.
sequence
==
6
||
card
.
p
.
sequence
==
7
))
{
{
targetTime
+=
0
;
targetTime
+=
0
;
}
}
else
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_ONFIELD
)
>
0
)
else
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Onfield
)
>
0
)
{
{
targetTime
+=
30
;
targetTime
+=
30
;
}
}
...
@@ -4820,9 +4820,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -4820,9 +4820,9 @@ public class Ocgcore : ServantWithCardDescription
{
{
if
(
cardsInSelectAnimation
.
Count
==
2
)
if
(
cardsInSelectAnimation
.
Count
==
2
)
{
{
if
(
cardsInSelectAnimation
[
0
].
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
cardsInSelectAnimation
[
0
].
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
cardsInSelectAnimation
[
1
].
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_SZONE
)
if
(
cardsInSelectAnimation
[
1
].
p
.
location
==
(
UInt32
)
CardLocation
.
SpellZone
)
{
{
if
(
cardsInSelectAnimation
[
1
].
p
.
sequence
==
6
||
cardsInSelectAnimation
[
1
].
p
.
sequence
==
7
)
if
(
cardsInSelectAnimation
[
1
].
p
.
sequence
==
6
||
cardsInSelectAnimation
[
1
].
p
.
sequence
==
7
)
{
{
...
@@ -5091,7 +5091,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5091,7 +5091,7 @@ public class Ocgcore : ServantWithCardDescription
VectorAttackTarget
=
get_point_worldposition
(
gpsAttacked
);
VectorAttackTarget
=
get_point_worldposition
(
gpsAttacked
);
VectorAttackTarget
+=
(
VectorAttackTarget
-
VectorAttackCard
)
*
0.3f
;
VectorAttackTarget
+=
(
VectorAttackTarget
-
VectorAttackCard
)
*
0.3f
;
}
}
if
((
attackedCard
!=
null
&&
gpsAttacked
.
location
!=
0
)
&&
(
attackedCard
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP_ATTACK
)
>
0
)
if
((
attackedCard
!=
null
&&
gpsAttacked
.
location
!=
0
)
&&
(
attackedCard
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUpAttack
)
>
0
)
{
{
if
(
attackCard
.
get_data
().
Attack
>
attackedCard
.
get_data
().
Attack
)
if
(
attackCard
.
get_data
().
Attack
>
attackedCard
.
get_data
().
Attack
)
{
{
...
@@ -5231,7 +5231,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5231,7 +5231,7 @@ public class Ocgcore : ServantWithCardDescription
player
=
localPlayer
(
r
.
ReadByte
());
player
=
localPlayer
(
r
.
ReadByte
());
ES_searchCode
.
Clear
();
ES_searchCode
.
Clear
();
ES_searchCode
.
Add
(
r
.
ReadInt32
());
ES_searchCode
.
Add
(
r
.
ReadInt32
());
ES_searchCode
.
Add
((
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISTYPE
);
ES_searchCode
.
Add
((
int
)
searchCode
.
OPCODE_ISTYPE
);
RMSshow_input
(
"AnnounceCard"
,
InterString
.
Get
(
"请输入关键字。"
),
""
);
RMSshow_input
(
"AnnounceCard"
,
InterString
.
Get
(
"请输入关键字。"
),
""
);
break
;
break
;
case
GameMessage
.
AnnounceCardFilter
:
case
GameMessage
.
AnnounceCardFilter
:
...
@@ -5375,11 +5375,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5375,11 +5375,11 @@ public class Ocgcore : ServantWithCardDescription
placs
.
data
[
1
]
=
resp
[
1
];
placs
.
data
[
1
]
=
resp
[
1
];
placs
.
data
[
2
]
=
resp
[
2
];
placs
.
data
[
2
]
=
resp
[
2
];
placeSelectors
.
Add
(
placs
);
placeSelectors
.
Add
(
placs
);
if
(
location
==
(
uint
)
game_location
.
LOCATION_MZONE
&&
Program
.
I
().
setting
.
setting
.
hand
.
value
==
false
)
if
(
location
==
(
uint
)
CardLocation
.
MonsterZone
&&
Program
.
I
().
setting
.
setting
.
hand
.
value
==
false
)
{
{
ES_placeSelected
(
placs
);
ES_placeSelected
(
placs
);
}
}
if
(
location
==
(
uint
)
game_location
.
LOCATION_SZONE
&&
Program
.
I
().
setting
.
setting
.
handm
.
value
==
false
)
if
(
location
==
(
uint
)
CardLocation
.
SpellZone
&&
Program
.
I
().
setting
.
setting
.
handm
.
value
==
false
)
{
{
ES_placeSelected
(
placs
);
ES_placeSelected
(
placs
);
}
}
...
@@ -5389,7 +5389,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5389,7 +5389,7 @@ public class Ocgcore : ServantWithCardDescription
{
{
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
player
)
if
(
cards
[
i
].
p
.
controller
==
player
)
{
{
...
@@ -5508,7 +5508,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5508,7 +5508,7 @@ public class Ocgcore : ServantWithCardDescription
return
cardsInLocation
;
return
cardsInLocation
;
}
}
void
MHS_creatBundle
(
int
count
,
int
player
,
game_l
ocation
location
)
void
MHS_creatBundle
(
int
count
,
int
player
,
CardL
ocation
location
)
{
{
for
(
int
i
=
0
;
i
<
count
;
i
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
...
@@ -5516,13 +5516,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5516,13 +5516,13 @@ public class Ocgcore : ServantWithCardDescription
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
location
,
location
=
(
UInt32
)
location
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
});
});
}
}
}
}
List
<
gameCard
>
MHS_resizeBundle
(
int
count
,
int
player
,
game_l
ocation
location
)
List
<
gameCard
>
MHS_resizeBundle
(
int
count
,
int
player
,
CardL
ocation
location
)
{
{
List
<
gameCard
>
cardBow
=
new
List
<
gameCard
>();
List
<
gameCard
>
cardBow
=
new
List
<
gameCard
>();
List
<
gameCard
>
waterOutOfBow
=
new
List
<
gameCard
>();
List
<
gameCard
>
waterOutOfBow
=
new
List
<
gameCard
>();
...
@@ -5555,14 +5555,14 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5555,14 +5555,14 @@ public class Ocgcore : ServantWithCardDescription
{
{
controller
=
(
UInt32
)
player
,
controller
=
(
UInt32
)
player
,
location
=
(
UInt32
)
location
,
location
=
(
UInt32
)
location
,
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
,
position
=
(
int
)
CardPosition
.
FaceDownAttack
,
sequence
=
(
UInt32
)(
cardBow
.
Count
),
sequence
=
(
UInt32
)(
cardBow
.
Count
),
}));
}));
}
}
for
(
int
i
=
0
;
i
<
cardBow
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
cardBow
.
Count
;
i
++)
{
{
cardBow
[
i
].
erase_data
();
cardBow
[
i
].
erase_data
();
cardBow
[
i
].
p
.
position
=
(
int
)
game_position
.
POS_FACEDOWN_ATTACK
;
cardBow
[
i
].
p
.
position
=
(
int
)
CardPosition
.
FaceDownAttack
;
}
}
return
cardBow
;
return
cardBow
;
}
}
...
@@ -5614,19 +5614,19 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5614,19 +5614,19 @@ public class Ocgcore : ServantWithCardDescription
GameObject
prewarmAttackEffect
(
gameCard
card
,
Vector3
from
,
Vector3
to
)
GameObject
prewarmAttackEffect
(
gameCard
card
,
Vector3
from
,
Vector3
to
)
{
{
GameObject
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_earth
;
GameObject
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_earth
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Earth
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_earth
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_earth
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Water
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_water
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_water
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Fire
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_fire
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_fire
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Wind
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_wind
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_wind
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Dark
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_dark
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_dark
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Light
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_light
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_light
;
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
game_attributes
.
ATTRIBUTE_DEVINE
))
if
(
GameStringHelper
.
differ
(
card
.
get_data
().
Attribute
,
(
long
)
CardAttribute
.
Divine
))
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_light
;
mod
=
Program
.
I
().
mod_ocgcore_bs_atk_line_light
;
mod
.
transform
.
GetChild
(
0
).
localPosition
=
to
;
mod
.
transform
.
GetChild
(
0
).
localPosition
=
to
;
mod
.
transform
.
GetChild
(
1
).
localPosition
=
from
;
mod
.
transform
.
GetChild
(
1
).
localPosition
=
from
;
...
@@ -5946,7 +5946,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -5946,7 +5946,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
cards
.
Count
>
0
)
if
(
cards
.
Count
>
0
)
{
{
UInt32
loc
=
cards
[
0
].
p
.
location
;
UInt32
loc
=
cards
[
0
].
p
.
location
;
if
(
loc
!=
(
UInt32
)
game_location
.
LOCATION_DECK
)
if
(
loc
!=
(
UInt32
)
CardLocation
.
Deck
)
{
{
return
false
;
return
false
;
}
}
...
@@ -6287,7 +6287,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6287,7 +6287,7 @@ public class Ocgcore : ServantWithCardDescription
flagForTimeConfirm
=
false
;
flagForTimeConfirm
=
false
;
flagForCancleChain
=
false
;
flagForCancleChain
=
false
;
//Package p = new Package();
//Package p = new Package();
//p.Fuction = (int)
YGOSharp.OCGWrapper.Enums.
GameMessage.sibyl_clear;
//p.Fuction = (int)GameMessage.sibyl_clear;
//TcpHelper.AddRecordLine(p);
//TcpHelper.AddRecordLine(p);
if
(
clearTimeFlag
)
if
(
clearTimeFlag
)
{
{
...
@@ -6311,7 +6311,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6311,7 +6311,7 @@ public class Ocgcore : ServantWithCardDescription
clearAllSelectPlace
();
clearAllSelectPlace
();
int
myMaxDeck
=
countLocationSequence
(
0
,
game_location
.
LOCATION_DECK
);
int
myMaxDeck
=
countLocationSequence
(
0
,
CardLocation
.
Deck
);
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
...
@@ -6325,7 +6325,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6325,7 +6325,7 @@ public class Ocgcore : ServantWithCardDescription
{
{
cards
[
i
].
forSelect
=
false
;
cards
[
i
].
forSelect
=
false
;
cards
[
i
].
isShowed
=
false
;
cards
[
i
].
isShowed
=
false
;
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
deckReserved
==
false
||
cards
[
i
].
p
.
controller
!=
0
||
cards
[
i
].
p
.
sequence
!=
myMaxDeck
)
if
(
deckReserved
==
false
||
cards
[
i
].
p
.
controller
!=
0
||
cards
[
i
].
p
.
sequence
!=
myMaxDeck
)
{
{
...
@@ -6341,7 +6341,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6341,7 +6341,7 @@ public class Ocgcore : ServantWithCardDescription
cards
[
i
].
isShowed
=
false
;
cards
[
i
].
isShowed
=
false
;
}
}
}
}
if
(
cards
[
i
].
p
.
location
==
(
uint
)
game_location
.
LOCATION_DECK
)
if
(
cards
[
i
].
p
.
location
==
(
uint
)
CardLocation
.
Deck
)
{
{
cards
[
i
].
isShowed
=
false
;
cards
[
i
].
isShowed
=
false
;
}
}
...
@@ -6356,7 +6356,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6356,7 +6356,7 @@ public class Ocgcore : ServantWithCardDescription
List
<
gameCard
>
to_clear
=
new
List
<
gameCard
>();
List
<
gameCard
>
to_clear
=
new
List
<
gameCard
>();
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
(
cards
[
i
].
p
.
location
==
(
uint
)
game_location
.
s
earch
)
if
(
cards
[
i
].
p
.
location
==
(
uint
)
CardLocation
.
S
earch
)
{
{
to_clear
.
Add
(
cards
[
i
]);
to_clear
.
Add
(
cards
[
i
]);
}
}
...
@@ -6365,7 +6365,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6365,7 +6365,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
to_clear
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
to_clear
.
Count
;
i
++)
{
{
to_clear
[
i
].
hide
();
to_clear
[
i
].
hide
();
to_clear
[
i
].
p
.
location
=
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
;
to_clear
[
i
].
p
.
location
=
(
UInt32
)
CardLocation
.
Unknown
;
}
}
gameInfo
.
removeAll
();
gameInfo
.
removeAll
();
RMSshow_clear
();
RMSshow_clear
();
...
@@ -6452,7 +6452,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6452,7 +6452,7 @@ public class Ocgcore : ServantWithCardDescription
List
<
gameCard
>
to_clear
=
new
List
<
gameCard
>();
List
<
gameCard
>
to_clear
=
new
List
<
gameCard
>();
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
(
cards
[
i
].
p
.
location
==
(
uint
)
game_location
.
LOCATION_UNKNOWN
)
if
(
cards
[
i
].
p
.
location
==
(
uint
)
CardLocation
.
Unknown
)
{
{
to_clear
.
Add
(
cards
[
i
]);
to_clear
.
Add
(
cards
[
i
]);
}
}
...
@@ -6488,18 +6488,18 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6488,18 +6488,18 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
if
(
cards
[
i
].
cookie_cared
==
false
)
if
(
cards
[
i
].
cookie_cared
==
false
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
cards
[
i
].
isShowed
=
false
;
cards
[
i
].
isShowed
=
false
;
}
}
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
cards
[
i
].
isShowed
=
false
;
cards
[
i
].
isShowed
=
false
;
}
}
}
}
if
((((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
)
&&
(
cards
[
i
].
p
.
controller
==
0
))
||
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_UNKNOWN
)
>
0
))
if
((((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
)
&&
(
cards
[
i
].
p
.
controller
==
0
))
||
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Unknown
)
>
0
))
{
{
cards
[
i
].
isShowed
=
true
;
cards
[
i
].
isShowed
=
true
;
}
}
...
@@ -6514,7 +6514,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6514,7 +6514,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
(
cards
[
i
].
p
.
location
==
(
uint
)
game_location
.
s
earch
)
if
(
cards
[
i
].
p
.
location
==
(
uint
)
CardLocation
.
S
earch
)
{
{
cards
[
i
].
isShowed
=
true
;
cards
[
i
].
isShowed
=
true
;
}
}
...
@@ -6602,13 +6602,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6602,13 +6602,13 @@ public class Ocgcore : ServantWithCardDescription
{
{
if
(
cards
[
i
].
p
.
controller
==
1
)
if
(
cards
[
i
].
p
.
controller
==
1
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
op_m
.
Add
(
cards
[
i
]);
op_m
.
Add
(
cards
[
i
]);
}
}
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
op_s
.
Add
(
cards
[
i
]);
op_s
.
Add
(
cards
[
i
]);
}
}
...
@@ -6617,7 +6617,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6617,7 +6617,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
for
(
int
m
=
0
;
m
<
op_m
.
Count
;
m
++)
for
(
int
m
=
0
;
m
<
op_m
.
Count
;
m
++)
{
{
if
((
op_m
[
m
].
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
op_m
[
m
].
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
for
(
int
s
=
0
;
s
<
op_s
.
Count
;
s
++)
for
(
int
s
=
0
;
s
<
op_s
.
Count
;
s
++)
{
{
...
@@ -6646,13 +6646,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6646,13 +6646,13 @@ public class Ocgcore : ServantWithCardDescription
}
}
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
sequence
>=
0
&&
cards
[
i
].
p
.
sequence
<=
6
)
if
(
cards
[
i
].
p
.
sequence
>=
0
&&
cards
[
i
].
p
.
sequence
<=
6
)
{
{
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
1
)
if
(
cards
[
i
].
p
.
controller
==
1
)
{
{
...
@@ -6713,15 +6713,15 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6713,15 +6713,15 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
sequence
>=
0
&&
cards
[
i
].
p
.
sequence
<=
6
)
if
(
cards
[
i
].
p
.
sequence
>=
0
&&
cards
[
i
].
p
.
sequence
<=
6
)
{
{
if
((
cards
[
i
].
get_data
().
Type
&
(
UInt32
)
game_type
.
l
ink
)
>
0
)
if
((
cards
[
i
].
get_data
().
Type
&
(
UInt32
)
CardType
.
L
ink
)
>
0
)
{
{
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
1
)
if
(
cards
[
i
].
p
.
controller
==
1
)
{
{
...
@@ -6771,7 +6771,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6771,7 +6771,7 @@ public class Ocgcore : ServantWithCardDescription
//if (vvv[curHang, curLie] != null)
//if (vvv[curHang, curLie] != null)
{
{
GPS
currentGPS
=
new
GPS
();
GPS
currentGPS
=
new
GPS
();
currentGPS
.
location
=
(
int
)
game_location
.
LOCATION_MZONE
;
currentGPS
.
location
=
(
int
)
CardLocation
.
MonsterZone
;
if
(
curHang
==
4
)
if
(
curHang
==
4
)
{
{
currentGPS
.
controller
=
1
;
currentGPS
.
controller
=
1
;
...
@@ -6963,7 +6963,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -6963,7 +6963,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
if
(
cards
[
i
].
cookie_cared
==
false
)
if
(
cards
[
i
].
cookie_cared
==
false
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_HAND
)
>
0
&&
cards
[
i
].
p
.
controller
==
1
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Hand
)
>
0
&&
cards
[
i
].
p
.
controller
==
1
)
{
{
line
.
Add
(
cards
[
i
]);
line
.
Add
(
cards
[
i
]);
}
}
...
@@ -7007,7 +7007,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7007,7 +7007,7 @@ public class Ocgcore : ServantWithCardDescription
int
overC
=
0
;
int
overC
=
0
;
if
(
Program
.
getVerticalTransparency
()
>
0.5f
)
if
(
Program
.
getVerticalTransparency
()
>
0.5f
)
{
{
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
game_position
.
POS_FACEUP
)
>
0
&&
(
cards
[
i
].
p
.
location
&
(
Int32
)
game_location
.
LOCATION_ONFIELD
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
CardPosition
.
FaceUp
)
>
0
&&
(
cards
[
i
].
p
.
location
&
(
Int32
)
CardLocation
.
Onfield
)
>
0
)
{
{
overC
=
overlayed_cards
.
Count
;
overC
=
overlayed_cards
.
Count
;
}
}
...
@@ -7024,7 +7024,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7024,7 +7024,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
foreach
(
var
item
in
cards
[
i
].
target
)
foreach
(
var
item
in
cards
[
i
].
target
)
{
{
if
((
item
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
||
(
item
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
item
.
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
||
(
item
.
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
animation_thunder
(
item
.
gameObject
,
cards
[
i
].
gameObject
);
animation_thunder
(
item
.
gameObject
,
cards
[
i
].
gameObject
);
}
}
...
@@ -7058,11 +7058,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7058,11 +7058,11 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
if
(
cards
[
i
].
cookie_cared
==
false
)
if
(
cards
[
i
].
cookie_cared
==
false
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
sequence
==
0
||
cards
[
i
].
p
.
sequence
==
4
)
if
(
cards
[
i
].
p
.
sequence
==
0
||
cards
[
i
].
p
.
sequence
==
4
)
{
{
if
((
cards
[
i
].
get_data
().
Type
&
(
int
)
game_type
.
TYPE_PENDULUM
)
>
0
)
if
((
cards
[
i
].
get_data
().
Type
&
(
int
)
CardType
.
Pendulum
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
controller
==
0
)
if
(
cards
[
i
].
p
.
controller
==
0
)
{
{
...
@@ -7195,7 +7195,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7195,7 +7195,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
if
(
cards
[
i
].
cookie_cared
==
false
)
if
(
cards
[
i
].
cookie_cared
==
false
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
if
(
cards
[
i
].
p
.
sequence
==
6
||
cards
[
i
].
p
.
sequence
==
7
)
if
(
cards
[
i
].
p
.
sequence
==
6
||
cards
[
i
].
p
.
sequence
==
7
)
{
{
...
@@ -7240,9 +7240,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7240,9 +7240,9 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
if
(
cards
[
i
].
cookie_cared
==
false
)
if
(
cards
[
i
].
cookie_cared
==
false
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
cards
[
i
].
cookie_cared
=
true
;
cards
[
i
].
cookie_cared
=
true
;
cards
[
i
].
UA_give_condition
(
get_point_worldcondition
(
cards
[
i
].
p
));
cards
[
i
].
UA_give_condition
(
get_point_worldcondition
(
cards
[
i
].
p
));
...
@@ -7272,11 +7272,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7272,11 +7272,11 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
(((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
&&
cards
[
i
].
p
.
sequence
==
5
)
if
(((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
&&
cards
[
i
].
p
.
sequence
==
5
)
{
{
if
(
cards
[
i
].
p
.
controller
==
0
)
if
(
cards
[
i
].
p
.
controller
==
0
)
{
{
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
code
=
cards
[
i
].
get_data
().
Id
;
code
=
cards
[
i
].
get_data
().
Id
;
}
}
...
@@ -7290,11 +7290,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7290,11 +7290,11 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
(((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
&&
cards
[
i
].
p
.
sequence
==
5
)
if
(((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
&&
cards
[
i
].
p
.
sequence
==
5
)
{
{
if
(
cards
[
i
].
p
.
controller
==
1
)
if
(
cards
[
i
].
p
.
controller
==
1
)
{
{
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
Int32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
code
=
cards
[
i
].
get_data
().
Id
;
code
=
cards
[
i
].
get_data
().
Id
;
}
}
...
@@ -7360,14 +7360,14 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7360,14 +7360,14 @@ public class Ocgcore : ServantWithCardDescription
}
}
animation_count
(
gameField
.
LOCATION_DECK_0
,
game_location
.
LOCATION_DECK
,
0
);
animation_count
(
gameField
.
LOCATION_DECK_0
,
CardLocation
.
Deck
,
0
);
animation_count
(
gameField
.
LOCATION_EXTRA_0
,
game_location
.
LOCATION_EXTRA
,
0
);
animation_count
(
gameField
.
LOCATION_EXTRA_0
,
CardLocation
.
Extra
,
0
);
animation_count
(
gameField
.
LOCATION_GRAVE_0
,
game_location
.
LOCATION_GRAVE
,
0
);
animation_count
(
gameField
.
LOCATION_GRAVE_0
,
CardLocation
.
Grave
,
0
);
animation_count
(
gameField
.
LOCATION_REMOVED_0
,
game_location
.
LOCATION_REMOVED
,
0
);
animation_count
(
gameField
.
LOCATION_REMOVED_0
,
CardLocation
.
Removed
,
0
);
animation_count
(
gameField
.
LOCATION_DECK_1
,
game_location
.
LOCATION_DECK
,
1
);
animation_count
(
gameField
.
LOCATION_DECK_1
,
CardLocation
.
Deck
,
1
);
animation_count
(
gameField
.
LOCATION_EXTRA_1
,
game_location
.
LOCATION_EXTRA
,
1
);
animation_count
(
gameField
.
LOCATION_EXTRA_1
,
CardLocation
.
Extra
,
1
);
animation_count
(
gameField
.
LOCATION_GRAVE_1
,
game_location
.
LOCATION_GRAVE
,
1
);
animation_count
(
gameField
.
LOCATION_GRAVE_1
,
CardLocation
.
Grave
,
1
);
animation_count
(
gameField
.
LOCATION_REMOVED_1
,
game_location
.
LOCATION_REMOVED
,
1
);
animation_count
(
gameField
.
LOCATION_REMOVED_1
,
CardLocation
.
Removed
,
1
);
gameField
.
realize
();
gameField
.
realize
();
Program
.
notGo
(
gameInfo
.
realize
);
Program
.
notGo
(
gameInfo
.
realize
);
Program
.
go
(
50
,
gameInfo
.
realize
);
Program
.
go
(
50
,
gameInfo
.
realize
);
...
@@ -7414,7 +7414,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7414,7 +7414,7 @@ public class Ocgcore : ServantWithCardDescription
Vector3
get_world_rotation
(
gameCard
card
)
Vector3
get_world_rotation
(
gameCard
card
)
{
{
cardRuleComdition
r
=
cardRuleComdition
.
meUpAtk
;
cardRuleComdition
r
=
cardRuleComdition
.
meUpAtk
;
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_DECK
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Deck
)
>
0
)
{
{
if
(
card
.
get_data
().
Id
>
0
)
if
(
card
.
get_data
().
Id
>
0
)
{
{
...
@@ -7425,13 +7425,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7425,13 +7425,13 @@ public class Ocgcore : ServantWithCardDescription
r
=
cardRuleComdition
.
meDownAtk
;
r
=
cardRuleComdition
.
meDownAtk
;
}
}
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_GRAVE
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Grave
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_REMOVED
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Removed
)
>
0
)
{
{
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
...
@@ -7440,9 +7440,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7440,9 +7440,9 @@ public class Ocgcore : ServantWithCardDescription
r
=
cardRuleComdition
.
meDownAtk
;
r
=
cardRuleComdition
.
meDownAtk
;
}
}
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_EXTRA
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Extra
)
>
0
)
{
{
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
...
@@ -7451,28 +7451,28 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7451,28 +7451,28 @@ public class Ocgcore : ServantWithCardDescription
r
=
cardRuleComdition
.
meDownAtk
;
r
=
cardRuleComdition
.
meDownAtk
;
}
}
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
{
{
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEDOWN_DEFENSE
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceDownDefence
)
>
0
)
{
{
r
=
cardRuleComdition
.
meDownDef
;
r
=
cardRuleComdition
.
meDownDef
;
}
}
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP_DEFENSE
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUpDefence
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpDef
;
r
=
cardRuleComdition
.
meUpDef
;
}
}
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEDOWN_ATTACK
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceDownAttack
)
>
0
)
{
{
r
=
cardRuleComdition
.
meDownAtk
;
r
=
cardRuleComdition
.
meDownAtk
;
}
}
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP_ATTACK
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUpAttack
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
)
{
{
if
((
card
.
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
card
.
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
...
@@ -7481,7 +7481,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7481,7 +7481,7 @@ public class Ocgcore : ServantWithCardDescription
r
=
cardRuleComdition
.
meDownAtk
;
r
=
cardRuleComdition
.
meDownAtk
;
}
}
}
}
if
((
card
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
card
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
r
=
cardRuleComdition
.
meUpAtk
;
r
=
cardRuleComdition
.
meUpAtk
;
}
}
...
@@ -7534,7 +7534,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7534,7 +7534,7 @@ public class Ocgcore : ServantWithCardDescription
//private Vector3 get_real_rotation(int i)
//private Vector3 get_real_rotation(int i)
//{
//{
// Vector3 r = get_point_worldrotation(cards[i].p);
// Vector3 r = get_point_worldrotation(cards[i].p);
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_DECK
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.Deck
) > 0)
// {
// {
// if (cards[i].get_data().Id > 0)
// if (cards[i].get_data().Id > 0)
// {
// {
...
@@ -7545,51 +7545,51 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7545,51 +7545,51 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0);
// r = new Vector3(-90, 0, 0);
// }
// }
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_MZONE
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.MonsterZone
) > 0)
// {
// {
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEDOWN
_DEFENSE) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceDown
_DEFENSE) > 0)
// {
// {
// r = new Vector3(-90, 0, 90);
// r = new Vector3(-90, 0, 90);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP
_DEFENSE) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUp
_DEFENSE) > 0)
// {
// {
// r = new Vector3(90, 0, 90);
// r = new Vector3(90, 0, 90);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEDOWN_ATTACK
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceDownAttack
) > 0)
// {
// {
// r = new Vector3(-90, 0, 0);
// r = new Vector3(-90, 0, 0);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP_ATTACK
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUpAttack
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_SZONE
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.SpellZone
) > 0)
// {
// {
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEDOWN
_DEFENSE) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceDown
_DEFENSE) > 0)
// {
// {
// r = new Vector3(-90, 0, 90);
// r = new Vector3(-90, 0, 90);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP
_DEFENSE) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUp
_DEFENSE) > 0)
// {
// {
// r = new Vector3(90, 0, 90);
// r = new Vector3(90, 0, 90);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEDOWN_ATTACK
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceDownAttack
) > 0)
// {
// {
// r = new Vector3(-90, 0, 0);
// r = new Vector3(-90, 0, 0);
// }
// }
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP_ATTACK
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUpAttack
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_GRAVE
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.Grave
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_REMOVED
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.Removed
) > 0)
// {
// {
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUp
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
...
@@ -7598,9 +7598,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7598,9 +7598,9 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0);
// r = new Vector3(-90, 0, 0);
// }
// }
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_EXTRA
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.Extra
) > 0)
// {
// {
// if ((cards[i].p.position & (UInt32)
game_position.POS_FACEUP
) > 0)
// if ((cards[i].p.position & (UInt32)
CardPosition.FaceUp
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
...
@@ -7609,7 +7609,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7609,7 +7609,7 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0);
// r = new Vector3(-90, 0, 0);
// }
// }
// }
// }
// if ((cards[i].p.location & (UInt32)
game_location.LOCATION_OVERLAY
) > 0)
// if ((cards[i].p.location & (UInt32)
CardLocation.Overlay
) > 0)
// {
// {
// r = new Vector3(90, 0, 0);
// r = new Vector3(90, 0, 0);
// }
// }
...
@@ -7621,7 +7621,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7621,7 +7621,7 @@ public class Ocgcore : ServantWithCardDescription
// return r;
// return r;
//}
//}
private
void
animation_count
(
TMPro
.
TextMeshPro
textmesh
,
game_l
ocation
location
,
int
player
)
private
void
animation_count
(
TMPro
.
TextMeshPro
textmesh
,
CardL
ocation
location
,
int
player
)
{
{
int
count
=
0
;
int
count
=
0
;
int
countU
=
0
;
int
countU
=
0
;
...
@@ -7632,7 +7632,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7632,7 +7632,7 @@ public class Ocgcore : ServantWithCardDescription
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
location
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
location
)
>
0
)
{
{
count
++;
count
++;
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
game_position
.
POS_FACEUP
)
>
0
)
if
((
cards
[
i
].
p
.
position
&
(
UInt32
)
CardPosition
.
FaceUp
)
>
0
)
{
{
countU
++;
countU
++;
}
}
...
@@ -7645,7 +7645,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7645,7 +7645,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
(
location
==
game_location
.
LOCATION_EXTRA
)
if
(
location
==
CardLocation
.
Extra
)
{
{
textmesh
.
text
=
count
.
ToString
()+
"("
+
countU
.
ToString
()+
")"
;
textmesh
.
text
=
count
.
ToString
()+
"("
+
countU
.
ToString
()+
")"
;
}
}
...
@@ -7708,7 +7708,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7708,7 +7708,7 @@ public class Ocgcore : ServantWithCardDescription
public
gameCard
GCS_cardGet
(
GPS
p
,
bool
create
)
public
gameCard
GCS_cardGet
(
GPS
p
,
bool
create
)
{
{
gameCard
c
=
null
;
gameCard
c
=
null
;
if
((
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
{
{
...
@@ -7770,13 +7770,13 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7770,13 +7770,13 @@ public class Ocgcore : ServantWithCardDescription
List
<
gameCard
>
cas
=
new
List
<
gameCard
>();
List
<
gameCard
>
cas
=
new
List
<
gameCard
>();
if
(
c
!=
null
)
if
(
c
!=
null
)
{
{
if
((
c
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
c
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
if
(
cards
[
i
].
p
.
controller
==
c
.
p
.
controller
)
if
(
cards
[
i
].
p
.
controller
==
c
.
p
.
controller
)
if
((
cards
[
i
].
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
(
c
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
if
((
cards
[
i
].
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
)
==
(
c
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
))
if
(
cards
[
i
].
p
.
sequence
==
c
.
p
.
sequence
)
if
(
cards
[
i
].
p
.
sequence
==
c
.
p
.
sequence
)
cas
.
Add
(
cards
[
i
]);
cas
.
Add
(
cards
[
i
]);
}
}
...
@@ -7824,7 +7824,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7824,7 +7824,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
swap
==
false
)
if
(
swap
==
false
)
{
{
if
((
p1
.
location
!=
p2
.
location
)
||
((
p2
.
position
&
(
int
)
game_position
.
POS_FACEDOWN
)
>
0
))
if
((
p1
.
location
!=
p2
.
location
)
||
((
p2
.
position
&
(
int
)
CardPosition
.
FaceDown
)
>
0
))
{
{
card_from
.
target
.
Clear
();
card_from
.
target
.
Clear
();
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
...
@@ -7836,7 +7836,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7836,7 +7836,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
}
if
((
p2
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
p2
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
card_from
.
p_beforeOverLayed
=
p1
;
card_from
.
p_beforeOverLayed
=
p1
;
}
}
...
@@ -7869,9 +7869,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7869,9 +7869,9 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
((
card_to
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
==
0
)
if
((
card_to
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
==
0
)
{
{
if
(((
card_to
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
>
0
)
||
((
card_to
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
>
0
))
if
(((
card_to
.
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
>
0
)
||
((
card_to
.
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
>
0
))
{
{
if
(
card_from
!=
null
)
if
(
card_from
!=
null
)
card_from
.
p
=
p2
;
card_from
.
p
=
p2
;
...
@@ -7905,7 +7905,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7905,7 +7905,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
overlayed_cards_of_cardFrom
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
overlayed_cards_of_cardFrom
.
Count
;
i
++)
{
{
overlayed_cards_of_cardFrom
[
i
].
p
.
controller
=
card_from
.
p
.
controller
;
overlayed_cards_of_cardFrom
[
i
].
p
.
controller
=
card_from
.
p
.
controller
;
overlayed_cards_of_cardFrom
[
i
].
p
.
location
=
card_from
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
;
overlayed_cards_of_cardFrom
[
i
].
p
.
location
=
card_from
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
;
overlayed_cards_of_cardFrom
[
i
].
p
.
sequence
=
card_from
.
p
.
sequence
;
overlayed_cards_of_cardFrom
[
i
].
p
.
sequence
=
card_from
.
p
.
sequence
;
overlayed_cards_of_cardFrom
[
i
].
p
.
position
+=
1000
;
overlayed_cards_of_cardFrom
[
i
].
p
.
position
+=
1000
;
}
}
...
@@ -7916,7 +7916,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7916,7 +7916,7 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
overlayed_cards_of_cardTo
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
overlayed_cards_of_cardTo
.
Count
;
i
++)
{
{
overlayed_cards_of_cardTo
[
i
].
p
.
controller
=
card_to
.
p
.
controller
;
overlayed_cards_of_cardTo
[
i
].
p
.
controller
=
card_to
.
p
.
controller
;
overlayed_cards_of_cardTo
[
i
].
p
.
location
=
card_to
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
;
overlayed_cards_of_cardTo
[
i
].
p
.
location
=
card_to
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
;
overlayed_cards_of_cardTo
[
i
].
p
.
sequence
=
card_to
.
p
.
sequence
;
overlayed_cards_of_cardTo
[
i
].
p
.
sequence
=
card_to
.
p
.
sequence
;
overlayed_cards_of_cardTo
[
i
].
p
.
position
+=
1000
;
overlayed_cards_of_cardTo
[
i
].
p
.
position
+=
1000
;
}
}
...
@@ -7978,21 +7978,21 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -7978,21 +7978,21 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
(
left
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_HAND
&&
right
.
p
.
location
!=
(
UInt32
)
game_location
.
LOCATION_HAND
)
if
(
left
.
p
.
location
==
(
UInt32
)
CardLocation
.
Hand
&&
right
.
p
.
location
!=
(
UInt32
)
CardLocation
.
Hand
)
{
{
a
=
-
1
;
a
=
-
1
;
}
}
else
if
(
left
.
p
.
location
!=
(
UInt32
)
game_location
.
LOCATION_HAND
&&
right
.
p
.
location
==
(
UInt32
)
game_location
.
LOCATION_HAND
)
else
if
(
left
.
p
.
location
!=
(
UInt32
)
CardLocation
.
Hand
&&
right
.
p
.
location
==
(
UInt32
)
CardLocation
.
Hand
)
{
{
a
=
1
;
a
=
1
;
}
}
else
else
{
{
if
((
left
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
(
right
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
if
((
left
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
)
>
(
right
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
))
{
{
a
=
-
1
;
a
=
-
1
;
}
}
else
if
((
left
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
<
(
right
.
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
else
if
((
left
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
)
<
(
right
.
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
))
{
{
a
=
1
;
a
=
1
;
}
}
...
@@ -8008,11 +8008,11 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8008,11 +8008,11 @@ public class Ocgcore : ServantWithCardDescription
}
}
else
else
{
{
if
((
left
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
(
right
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
if
((
left
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
(
right
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
))
{
{
a
=
-
1
;
a
=
-
1
;
}
}
else
if
((
left
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
<
(
right
.
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
else
if
((
left
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
<
(
right
.
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
))
{
{
a
=
1
;
a
=
1
;
}
}
...
@@ -8048,7 +8048,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8048,7 +8048,7 @@ public class Ocgcore : ServantWithCardDescription
{
{
sequenceWriter
=
0
;
sequenceWriter
=
0
;
}
}
if
((
preLocation
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
!=
(
cards
[
i
].
p
.
location
|
(
UInt32
)
game_location
.
LOCATION_OVERLAY
))
if
((
preLocation
|
(
UInt32
)
CardLocation
.
Overlay
)
!=
(
cards
[
i
].
p
.
location
|
(
UInt32
)
CardLocation
.
Overlay
))
{
{
sequenceWriter
=
0
;
sequenceWriter
=
0
;
}
}
...
@@ -8057,15 +8057,15 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8057,15 +8057,15 @@ public class Ocgcore : ServantWithCardDescription
positionWriter
=
0
;
positionWriter
=
0
;
}
}
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_MZONE
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
MonsterZone
)
==
0
)
{
{
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_SZONE
)
==
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
SpellZone
)
==
0
)
{
{
cards
[
i
].
p
.
sequence
=
sequenceWriter
;
cards
[
i
].
p
.
sequence
=
sequenceWriter
;
}
}
}
}
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
game_location
.
LOCATION_OVERLAY
)
>
0
)
if
((
cards
[
i
].
p
.
location
&
(
UInt32
)
CardLocation
.
Overlay
)
>
0
)
{
{
cards
[
i
].
p
.
position
=
positionWriter
;
cards
[
i
].
p
.
position
=
positionWriter
;
positionWriter
++;
positionWriter
++;
...
@@ -8752,7 +8752,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8752,7 +8752,7 @@ public class Ocgcore : ServantWithCardDescription
GPS
p
=
new
GPS
GPS
p
=
new
GPS
{
{
controller
=
0
,
controller
=
0
,
location
=
(
UInt32
)
game_location
.
s
earch
,
location
=
(
UInt32
)
CardLocation
.
S
earch
,
sequence
=
(
UInt32
)
i
,
sequence
=
(
UInt32
)
i
,
position
=
0
,
position
=
0
,
};
};
...
...
Assets/SibylSystem/ResourceManagers/GameStringHelper.cs
View file @
ffb143dc
using
System
;
using
System
;
using
YGOSharp
;
using
YGOSharp
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
GameStringHelper
public
class
GameStringHelper
{
{
...
@@ -149,27 +150,27 @@ public class GameStringHelper
...
@@ -149,27 +150,27 @@ public class GameStringHelper
{
{
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_EARTH
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Earth
))
{
{
re
=
"[F4A460]"
+
re
+
"[-]"
;
re
=
"[F4A460]"
+
re
+
"[-]"
;
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_WATER
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Water
))
{
{
re
=
"[D1EEEE]"
+
re
+
"[-]"
;
re
=
"[D1EEEE]"
+
re
+
"[-]"
;
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_FIRE
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Fire
))
{
{
re
=
"[F08080]"
+
re
+
"[-]"
;
re
=
"[F08080]"
+
re
+
"[-]"
;
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_WIND
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Wind
))
{
{
re
=
"[B3EE3A]"
+
re
+
"[-]"
;
re
=
"[B3EE3A]"
+
re
+
"[-]"
;
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_LIGHT
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Light
))
{
{
re
=
"[EEEE00]"
+
re
+
"[-]"
;
re
=
"[EEEE00]"
+
re
+
"[-]"
;
}
}
if
(
differ
(
card
.
Attribute
,
(
int
)
game_attributes
.
ATTRIBUTE_DARK
))
if
(
differ
(
card
.
Attribute
,
(
int
)
CardAttribute
.
Dark
))
{
{
re
=
"[FF00FF]"
+
re
+
"[-]"
;
re
=
"[FF00FF]"
+
re
+
"[-]"
;
}
}
...
@@ -182,9 +183,9 @@ public class GameStringHelper
...
@@ -182,9 +183,9 @@ public class GameStringHelper
string
re
=
""
;
string
re
=
""
;
try
try
{
{
if
(
differ
(
card
.
Type
,
(
long
)
game_type
.
TYPE_MONSTER
))
re
+=
"[ff8000]"
+
mainType
(
card
.
Type
);
if
(
differ
(
card
.
Type
,
(
long
)
CardType
.
Monster
))
re
+=
"[ff8000]"
+
mainType
(
card
.
Type
);
else
if
(
differ
(
card
.
Type
,
(
long
)
game_type
.
TYPE_SPELL
))
re
+=
"[7FFF00]"
+
mainType
(
card
.
Type
);
else
if
(
differ
(
card
.
Type
,
(
long
)
CardType
.
Spell
))
re
+=
"[7FFF00]"
+
mainType
(
card
.
Type
);
else
if
(
differ
(
card
.
Type
,
(
long
)
game_type
.
TYPE_TRAP
))
re
+=
"[dda0dd]"
+
mainType
(
card
.
Type
);
else
if
(
differ
(
card
.
Type
,
(
long
)
CardType
.
Trap
))
re
+=
"[dda0dd]"
+
mainType
(
card
.
Type
);
else
re
+=
"[ff8000]"
+
mainType
(
card
.
Type
);
else
re
+=
"[ff8000]"
+
mainType
(
card
.
Type
);
re
+=
"[-]"
;
re
+=
"[-]"
;
}
}
...
@@ -206,9 +207,9 @@ public class GameStringHelper
...
@@ -206,9 +207,9 @@ public class GameStringHelper
re
+=
"[ff8000]"
;
re
+=
"[ff8000]"
;
re
+=
"["
+
secondType
(
data
.
Type
)+
"]"
;
re
+=
"["
+
secondType
(
data
.
Type
)+
"]"
;
if
((
data
.
Type
&
(
int
)
game_type
.
l
ink
)
==
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
L
ink
)
==
0
)
{
{
if
((
data
.
Type
&
(
int
)
game_type
.
TYPE_XYZ
)
>
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
Xyz
)
>
0
)
{
{
re
+=
" "
+
race
(
data
.
Race
)
+
fen
+
attribute
(
data
.
Attribute
)
+
fen
+
data
.
Level
.
ToString
()
+
"[sup]☆[/sup]"
;
re
+=
" "
+
race
(
data
.
Race
)
+
fen
+
attribute
(
data
.
Attribute
)
+
fen
+
data
.
Level
.
ToString
()
+
"[sup]☆[/sup]"
;
}
}
...
@@ -251,7 +252,7 @@ public class GameStringHelper
...
@@ -251,7 +252,7 @@ public class GameStringHelper
re
+=
"[sup]ATK[/sup]"
+
data
.
Attack
.
ToString
()
+
" "
;
re
+=
"[sup]ATK[/sup]"
+
data
.
Attack
.
ToString
()
+
" "
;
}
}
}
}
if
((
data
.
Type
&
(
int
)
game_type
.
l
ink
)
==
0
)
if
((
data
.
Type
&
(
int
)
CardType
.
L
ink
)
==
0
)
{
{
if
(
data
.
Defense
<
0
)
if
(
data
.
Defense
<
0
)
{
{
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
ffb143dc
...
@@ -5,6 +5,7 @@ using System.Collections.Generic;
...
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using
System.IO
;
using
System.IO
;
using
System.Threading
;
using
System.Threading
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
enum
GameTextureType
public
enum
GameTextureType
{
{
...
@@ -219,7 +220,7 @@ public class GameTextureManager
...
@@ -219,7 +220,7 @@ public class GameTextureManager
pic
=
waitLoadStack
.
Pop
();
pic
=
waitLoadStack
.
Pop
();
try
try
{
{
pic
.
pCard
=
(
YGOSharp
.
CardsManager
.
Get
((
int
)
pic
.
code
).
Type
&
(
int
)
game_type
.
TYPE_PENDULUM
)
>
0
;
pic
.
pCard
=
(
YGOSharp
.
CardsManager
.
Get
((
int
)
pic
.
code
).
Type
&
(
int
)
CardType
.
Pendulum
)
>
0
;
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
...
...
Assets/SibylSystem/Room/Room.cs
View file @
ffb143dc
...
@@ -4,6 +4,7 @@ using System.Collections.Generic;
...
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using
System.IO
;
using
System.IO
;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
YGOSharp.Network.Enums
;
public
class
Room
:
WindowServantSP
public
class
Room
:
WindowServantSP
{
{
...
@@ -256,30 +257,30 @@ public class Room : WindowServantSP
...
@@ -256,30 +257,30 @@ public class Room : WindowServantSP
p
.
Data
=
new
BinaryMaster
();
p
.
Data
=
new
BinaryMaster
();
p
.
Data
.
writer
.
WriteUnicode
(
res
,
res
.
Length
+
1
);
p
.
Data
.
writer
.
WriteUnicode
(
res
,
res
.
Length
+
1
);
TcpHelper
.
AddRecordLine
(
p
);
TcpHelper
.
AddRecordLine
(
p
);
switch
((
YGOSharp
.
Network
.
Enums
.
PlayerType
)
player
)
switch
((
PlayerType
)
player
)
{
{
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Red
:
case
PlayerType
.
Red
:
result
=
"[FF3030]"
+
result
+
"[-]"
;
result
=
"[FF3030]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Green
:
case
PlayerType
.
Green
:
result
=
"[7CFC00]"
+
result
+
"[-]"
;
result
=
"[7CFC00]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Blue
:
case
PlayerType
.
Blue
:
result
=
"[4876FF]"
+
result
+
"[-]"
;
result
=
"[4876FF]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
BabyBlue
:
case
PlayerType
.
BabyBlue
:
result
=
"[63B8FF]"
+
result
+
"[-]"
;
result
=
"[63B8FF]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Pink
:
case
PlayerType
.
Pink
:
result
=
"[EED2EE]"
+
result
+
"[-]"
;
result
=
"[EED2EE]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Yellow
:
case
PlayerType
.
Yellow
:
result
=
"[EEEE00]"
+
result
+
"[-]"
;
result
=
"[EEEE00]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
White
:
case
PlayerType
.
White
:
result
=
"[FAF0E6]"
+
result
+
"[-]"
;
result
=
"[FAF0E6]"
+
result
+
"[-]"
;
break
;
break
;
case
YGOSharp
.
Network
.
Enums
.
PlayerType
.
Gray
:
case
PlayerType
.
Gray
:
result
=
"[CDC9C9]"
+
result
+
"[-]"
;
result
=
"[CDC9C9]"
+
result
+
"[-]"
;
break
;
break
;
}
}
...
...
Assets/SibylSystem/Room/RoomList.cs
View file @
ffb143dc
...
@@ -109,11 +109,6 @@ public class RoomList : WindowServantSP
...
@@ -109,11 +109,6 @@ public class RoomList : WindowServantSP
string
portString
=
UIHelper
.
getByName
<
UIInput
>(
Program
.
I
().
selectServer
.
gameObject
,
"port_"
).
value
;
string
portString
=
UIHelper
.
getByName
<
UIInput
>(
Program
.
I
().
selectServer
.
gameObject
,
"port_"
).
value
;
string
pswString
=
roomPsw
;
string
pswString
=
roomPsw
;
string
versionString
=
UIHelper
.
getByName
<
UIInput
>(
Program
.
I
().
selectServer
.
gameObject
,
"version_"
).
value
;
string
versionString
=
UIHelper
.
getByName
<
UIInput
>(
Program
.
I
().
selectServer
.
gameObject
,
"version_"
).
value
;
if
(
versionString
==
""
)
{
UIHelper
.
getByName
<
UIInput
>(
Program
.
I
().
selectServer
.
gameObject
,
"version_"
).
value
=
"0x1349"
;
versionString
=
"0x1349"
;
}
Program
.
I
().
roomList
.
hide
();
Program
.
I
().
roomList
.
hide
();
Program
.
I
().
selectServer
.
KF_onlineGame
(
Name
,
ipString
,
portString
,
versionString
,
pswString
);
Program
.
I
().
selectServer
.
KF_onlineGame
(
Name
,
ipString
,
portString
,
versionString
,
pswString
);
}
}
...
...
Assets/SibylSystem/SelectDeck/selectDeck.cs
View file @
ffb143dc
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using
System.IO
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
selectDeck
:
WindowServantSP
public
class
selectDeck
:
WindowServantSP
{
{
...
@@ -318,15 +320,15 @@ public class selectDeck : WindowServantSP
...
@@ -318,15 +320,15 @@ public class selectDeck : WindowServantSP
{
{
mainAll
++;
mainAll
++;
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_MONSTER
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Monster
)
>
0
)
{
{
mainMonster
++;
mainMonster
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_SPELL
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Spell
)
>
0
)
{
{
mainSpell
++;
mainSpell
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_TRAP
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Trap
)
>
0
)
{
{
mainTrap
++;
mainTrap
++;
}
}
...
@@ -349,15 +351,15 @@ public class selectDeck : WindowServantSP
...
@@ -349,15 +351,15 @@ public class selectDeck : WindowServantSP
{
{
sideAll
++;
sideAll
++;
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_MONSTER
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Monster
)
>
0
)
{
{
sideMonster
++;
sideMonster
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_SPELL
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Spell
)
>
0
)
{
{
sideSpell
++;
sideSpell
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_TRAP
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Trap
)
>
0
)
{
{
sideTrap
++;
sideTrap
++;
}
}
...
@@ -379,19 +381,19 @@ public class selectDeck : WindowServantSP
...
@@ -379,19 +381,19 @@ public class selectDeck : WindowServantSP
{
{
extraAll
++;
extraAll
++;
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
YGOSharp
.
Card
c
=
YGOSharp
.
CardsManager
.
Get
(
item
);
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_FUSION
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Fusion
)
>
0
)
{
{
extraFusion
++;
extraFusion
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_SYNCHRO
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Synchro
)
>
0
)
{
{
extraSync
++;
extraSync
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
TYPE_XYZ
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
Xyz
)
>
0
)
{
{
extraXyz
++;
extraXyz
++;
}
}
if
((
c
.
Type
&
(
UInt32
)
game_type
.
l
ink
)
>
0
)
if
((
c
.
Type
&
(
UInt32
)
CardType
.
L
ink
)
>
0
)
{
{
extraLink
++;
extraLink
++;
}
}
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
ffb143dc
...
@@ -1308,7 +1308,7 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1308,7 +1308,7 @@ public class DeckManager : ServantWithCardDescription
{
{
if
(
deck
.
GetCardCount
(
cardPicLoader_
.
data
.
Id
)
<
currentBanlist
.
GetQuantity
(
cardPicLoader_
.
data
.
Id
))
if
(
deck
.
GetCardCount
(
cardPicLoader_
.
data
.
Id
)
<
currentBanlist
.
GetQuantity
(
cardPicLoader_
.
data
.
Id
))
{
{
if
((
cardPicLoader_
.
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Token
)
==
0
)
if
((
cardPicLoader_
.
data
.
Type
&
(
UInt32
)
CardType
.
Token
)
==
0
)
{
{
MonoCardInDeckManager
card
=
createCard
();
MonoCardInDeckManager
card
=
createCard
();
card
.
transform
.
position
=
card
.
getGoodPosition
(
4
);
card
.
transform
.
position
=
card
.
getGoodPosition
(
4
);
...
@@ -1377,13 +1377,13 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1377,13 +1377,13 @@ public class DeckManager : ServantWithCardDescription
if
(
isSide
)
if
(
isSide
)
{
{
if
(
if
(
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
CardType
.
Fusion
)
>
0
||
||
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
CardType
.
Synchro
)
>
0
||
||
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
CardType
.
Xyz
)
>
0
||
||
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Link
)
>
0
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
CardType
.
Link
)
>
0
)
)
{
{
deck
.
IExtra
.
Add
(
MonoCardInDeckManager_
);
deck
.
IExtra
.
Add
(
MonoCardInDeckManager_
);
...
@@ -1421,13 +1421,13 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1421,13 +1421,13 @@ public class DeckManager : ServantWithCardDescription
deck
.
Side
.
Add
(
card
.
cardData
.
Id
);
deck
.
Side
.
Add
(
card
.
cardData
.
Id
);
}
}
else
if
(
else
if
(
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
(
data
.
Type
&
(
UInt32
)
CardType
.
Fusion
)
>
0
||
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
(
data
.
Type
&
(
UInt32
)
CardType
.
Synchro
)
>
0
||
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
(
data
.
Type
&
(
UInt32
)
CardType
.
Xyz
)
>
0
||
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Link
)
>
0
(
data
.
Type
&
(
UInt32
)
CardType
.
Link
)
>
0
)
)
{
{
deck
.
IExtra
.
Add
(
card
);
deck
.
IExtra
.
Add
(
card
);
...
@@ -1496,13 +1496,13 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1496,13 +1496,13 @@ public class DeckManager : ServantWithCardDescription
default
:
default
:
{
{
YGOSharp
.
Card
card
=
YGOSharp
.
CardsManager
.
Get
(
code
);
YGOSharp
.
Card
card
=
YGOSharp
.
CardsManager
.
Get
(
code
);
if
((
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
if
((
card
.
Type
&
(
UInt32
)
CardType
.
Fusion
)
>
0
||
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
(
card
.
Type
&
(
UInt32
)
CardType
.
Synchro
)
>
0
||
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
(
card
.
Type
&
(
UInt32
)
CardType
.
Xyz
)
>
0
||
||
(
card
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
l
ink
)
>
0
)
(
card
.
Type
&
(
UInt32
)
CardType
.
L
ink
)
>
0
)
{
{
deck
.
Extra
.
Add
(
code
);
deck
.
Extra
.
Add
(
code
);
deck
.
Deck_O
.
Extra
.
Add
(
code
);
deck
.
Deck_O
.
Extra
.
Add
(
code
);
...
@@ -1613,13 +1613,13 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1613,13 +1613,13 @@ public class DeckManager : ServantWithCardDescription
if
(
p
.
z
>
-
8
)
if
(
p
.
z
>
-
8
)
{
{
if
(
if
(
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Fusion
)
>
0
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
CardType
.
Fusion
)
>
0
||
||
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Synchro
)
>
0
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
CardType
.
Synchro
)
>
0
||
||
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
CardType
.
Xyz
)
>
0
||
||
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Link
)
>
0
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
CardType
.
Link
)
>
0
)
)
{
{
deck
.
IExtra
.
Add
(
deckTemp
[
i
]);
deck
.
IExtra
.
Add
(
deckTemp
[
i
]);
...
...
Assets/YGOSharp/CardsManager.cs
View file @
ffb143dc
...
@@ -4,6 +4,7 @@ using Mono.Data.Sqlite;
...
@@ -4,6 +4,7 @@ using Mono.Data.Sqlite;
using
System
;
using
System
;
using
System.IO
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
YGOSharp.OCGWrapper.Enums
;
namespace
YGOSharp
namespace
YGOSharp
{
{
...
@@ -117,7 +118,7 @@ namespace YGOSharp
...
@@ -117,7 +118,7 @@ namespace YGOSharp
foreach
(
var
item
in
_cards
)
foreach
(
var
item
in
_cards
)
{
{
Card
card
=
item
.
Value
;
Card
card
=
item
.
Value
;
if
((
card
.
Type
&
(
uint
)
game_type
.
TYPE_TOKEN
)
==
0
)
if
((
card
.
Type
&
(
uint
)
CardType
.
Token
)
==
0
)
{
{
if
(
getName
==
""
if
(
getName
==
""
||
Regex
.
Replace
(
card
.
Name
,
getName
,
"miaowu"
,
RegexOptions
.
IgnoreCase
)
!=
card
.
Name
||
Regex
.
Replace
(
card
.
Name
,
getName
,
"miaowu"
,
RegexOptions
.
IgnoreCase
)
!=
card
.
Name
...
@@ -231,7 +232,7 @@ namespace YGOSharp
...
@@ -231,7 +232,7 @@ namespace YGOSharp
{
{
switch
(
getsearchCode
[
i
])
switch
(
getsearchCode
[
i
])
{
{
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ADD
:
case
(
int
)
searchCode
.
OPCODE_ADD
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -239,7 +240,7 @@ namespace YGOSharp
...
@@ -239,7 +240,7 @@ namespace YGOSharp
stack
.
Push
(
lhs
+
rhs
);
stack
.
Push
(
lhs
+
rhs
);
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_SUB
:
case
(
int
)
searchCode
.
OPCODE_SUB
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -247,7 +248,7 @@ namespace YGOSharp
...
@@ -247,7 +248,7 @@ namespace YGOSharp
stack
.
Push
(
lhs
-
rhs
);
stack
.
Push
(
lhs
-
rhs
);
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_MUL
:
case
(
int
)
searchCode
.
OPCODE_MUL
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -255,7 +256,7 @@ namespace YGOSharp
...
@@ -255,7 +256,7 @@ namespace YGOSharp
stack
.
Push
(
lhs
*
rhs
);
stack
.
Push
(
lhs
*
rhs
);
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_DIV
:
case
(
int
)
searchCode
.
OPCODE_DIV
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -263,7 +264,7 @@ namespace YGOSharp
...
@@ -263,7 +264,7 @@ namespace YGOSharp
stack
.
Push
(
lhs
/
rhs
);
stack
.
Push
(
lhs
/
rhs
);
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_AND
:
case
(
int
)
searchCode
.
OPCODE_AND
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -280,7 +281,7 @@ namespace YGOSharp
...
@@ -280,7 +281,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_OR
:
case
(
int
)
searchCode
.
OPCODE_OR
:
if
(
stack
.
Count
>=
2
)
if
(
stack
.
Count
>=
2
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -297,14 +298,14 @@ namespace YGOSharp
...
@@ -297,14 +298,14 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_NEG
:
case
(
int
)
searchCode
.
OPCODE_NEG
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
stack
.
Push
(-
rhs
);
stack
.
Push
(-
rhs
);
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_NOT
:
case
(
int
)
searchCode
.
OPCODE_NOT
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
int
rhs
=
stack
.
Pop
();
int
rhs
=
stack
.
Pop
();
...
@@ -319,7 +320,7 @@ namespace YGOSharp
...
@@ -319,7 +320,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISCODE
:
case
(
int
)
searchCode
.
OPCODE_ISCODE
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
int
code
=
stack
.
Pop
();
int
code
=
stack
.
Pop
();
...
@@ -334,7 +335,7 @@ namespace YGOSharp
...
@@ -334,7 +335,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISSETCARD
:
case
(
int
)
searchCode
.
OPCODE_ISSETCARD
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
if
(
IfSetCard
(
stack
.
Pop
(),
card
.
Setcode
))
if
(
IfSetCard
(
stack
.
Pop
(),
card
.
Setcode
))
...
@@ -347,7 +348,7 @@ namespace YGOSharp
...
@@ -347,7 +348,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISTYPE
:
case
(
int
)
searchCode
.
OPCODE_ISTYPE
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
if
((
stack
.
Pop
()
&
card
.
Type
)
>
0
)
if
((
stack
.
Pop
()
&
card
.
Type
)
>
0
)
...
@@ -360,7 +361,7 @@ namespace YGOSharp
...
@@ -360,7 +361,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISRACE
:
case
(
int
)
searchCode
.
OPCODE_ISRACE
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
if
((
stack
.
Pop
()
&
card
.
Race
)
>
0
)
if
((
stack
.
Pop
()
&
card
.
Race
)
>
0
)
...
@@ -373,7 +374,7 @@ namespace YGOSharp
...
@@ -373,7 +374,7 @@ namespace YGOSharp
}
}
}
}
break
;
break
;
case
(
int
)
OCGWrapper
.
Enums
.
searchCode
.
OPCODE_ISATTRIBUTE
:
case
(
int
)
searchCode
.
OPCODE_ISATTRIBUTE
:
if
(
stack
.
Count
>=
1
)
if
(
stack
.
Count
>=
1
)
{
{
if
((
stack
.
Pop
()
&
card
.
Attribute
)
>
0
)
if
((
stack
.
Pop
()
&
card
.
Attribute
)
>
0
)
...
@@ -394,13 +395,13 @@ namespace YGOSharp
...
@@ -394,13 +395,13 @@ namespace YGOSharp
if
(
stack
.
Count
!=
1
||
stack
.
Pop
()
==
0
)
if
(
stack
.
Count
!=
1
||
stack
.
Pop
()
==
0
)
return
false
;
return
false
;
return
return
card
.
Id
==
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
Sp
.
CARD_MARINE_DOLPHIN
card
.
Id
==
(
int
)
TwoNameCards
.
CARD_MARINE_DOLPHIN
||
||
card
.
Id
==
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
Sp
.
CARD_TWINKLE_MOSS
card
.
Id
==
(
int
)
TwoNameCards
.
CARD_TWINKLE_MOSS
||
||
(!(
card
.
Alias
!=
0
)
(!(
card
.
Alias
!=
0
)
&&
((
card
.
Type
&
((
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Monster
+
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Token
)))
&&
((
card
.
Type
&
((
int
)
CardType
.
Monster
+
(
int
)
CardType
.
Token
)))
!=
((
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Monster
+
(
int
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Token
));
!=
((
int
)
CardType
.
Monster
+
(
int
)
CardType
.
Token
));
}
}
public
static
bool
IfSetCard
(
int
setCodeToAnalyse
,
long
setCodeFromCard
)
public
static
bool
IfSetCard
(
int
setCodeToAnalyse
,
long
setCodeFromCard
)
...
...
Assets/YGOSharp/Enums/CardAttribute.cs
View file @
ffb143dc
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
Divine
=
0x40
,
Divine
=
0x40
,
}
}
public
enum
Sp
public
enum
TwoNameCards
{
{
CARD_MARINE_DOLPHIN
=
78734254
,
CARD_MARINE_DOLPHIN
=
78734254
,
CARD_TWINKLE_MOSS
=
13857930
,
CARD_TWINKLE_MOSS
=
13857930
,
...
...
Assets/YGOSharp/Enums/CardLocation.cs
View file @
ffb143dc
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
Removed
=
0x20
,
Removed
=
0x20
,
Extra
=
0x40
,
Extra
=
0x40
,
Overlay
=
0x80
,
Overlay
=
0x80
,
Onfield
=
0x0C
Onfield
=
0x0C
,
Unknown
=
0
,
Search
=
0x800
}
}
}
}
\ No newline at end of file
Assets/old/UiverseAssests/UNIVERSE_FILES.meta
deleted
100644 → 0
View file @
d8033b10
fileFormatVersion: 2
guid: f327885de3e94cd4187a9a4e91544c1f
folderAsset: yes
timeCreated: 1469172510
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs
deleted
100644 → 0
View file @
d8033b10
//using Mono.Data.Sqlite;
//using System;
//using System.Collections.Generic;
//using System.IO;
//using SQLiteConnection = Mono.Data.Sqlite.SqliteConnection;
//using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
//using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
//public class CardDataManager
//{
// List<CardData> CardDatas;
// public CardDataManager()
// {
// CardDatas = new List<CardData>();
// DirectoryInfo TheFolder = new DirectoryInfo("data_card");
// FileInfo[] fileInfo = TheFolder.GetFiles();
// foreach (FileInfo NextFile in fileInfo)
// {
// string path = "data_card\\" + NextFile.Name;
// load(path);
// }
// }
// public void load(string path)
// {
// using (SQLiteConnection connection = new SQLiteConnection("Data Source=" + path))
// {
// connection.Open();
// using (SQLiteCommand command = new SQLiteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;",
// connection))
// {
// using (SQLiteDataReader reader = command.ExecuteReader())
// {
// while (reader.Read())
// {
// try
// {
// CardData c = new CardData();
// c.Str = new string[16];
// c.code = reader.GetInt64(0);
// c.Ot = reader.GetInt32(1);
// c.Alias = reader.GetInt64(2);
// c.SetCode = reader.GetInt64(3);
// c.Type = reader.GetInt64(4);
// c.Attack = reader.GetInt32(5);
// c.Defense = reader.GetInt32(6);
// long Level_raw = reader.GetInt64(7);
// c.Level = Level_raw & 0xff;
// c.LeftScale = (Level_raw >> 0x18) & 0xff;
// c.RightScale = (Level_raw >> 0x10) & 0xff;
// c.Race = reader.GetInt32(8);
// c.Attribute = reader.GetInt32(9);
// c.Category = reader.GetInt64(10);
// c.Name = reader.GetString(12);
// c.Desc = reader.GetString(13);
// c.tail = "";
// for (int ii = 0; ii < 0x10; ii++)
// {
// c.Str[ii] = reader.GetString(14 + ii);
// }
// CardDatas.Add(c);
// }
// catch (Exception e)
// {
// }
// }
// }
// }
// }
// /////////////////////////////////////////////////////
// //string text_all = System.IO.File.ReadAllText(path);
// //string[] card_strings = text_all.Split(new string[] { "/*/*/*/" }, StringSplitOptions.RemoveEmptyEntries);
// //foreach (string one_card_string in card_strings)
// //{
// // try
// // {
// // CardData c = new CardData();
// // c.Str = new string[16];
// // string[] elements = one_card_string.Split(new string[] { "|-" }, StringSplitOptions.RemoveEmptyEntries);
// // c.code = long.Parse(elements[0]);
// // c.Ot = int.Parse(elements[1]);
// // c.Alias = long.Parse(elements[2]);
// // c.SetCode = int.Parse(elements[3]);
// // c.Type = int.Parse(elements[4]);
// // c.Attack = int.Parse(elements[5]);
// // c.Defense = int.Parse(elements[6]);
// // c.Level = int.Parse(elements[7]);
// // c.LeftScale = int.Parse(elements[8]);
// // c.RightScale = int.Parse(elements[9]);
// // c.Race = int.Parse(elements[10]);
// // c.Attribute = int.Parse(elements[11]);
// // c.Name = elements[12];
// // c.Desc = elements[13];
// // for (int i = 0; i < 16;i++ )
// // {
// // if (elements.Length > 14 + i)
// // c.Str[i] = elements[14 + i];
// // }
// // CardDatas.Add(c);
// // }
// // catch(Exception e)
// // {
// // }
// //}
// }
// public CardData GetById(long id)
// {
// CardData card = new CardData();
// card.code = 0;
// card.Name = "预留广告位";
// card.Desc = "预留广告位 \n联系作者qq:914847518";
// if (id > 0) for (int i = 0; i < 10; i++)
// {
// foreach (CardData one_CardData in CardDatas)
// {
// if (one_CardData.code == id - i)
// {
// card = one_CardData;
// break;
// }
// }
// if (card.code > 0) break;
// }
// return card;
// }
// public List<CardData> search(UInt32 type, string str)
// {
// List<CardData> return_valse = new List<CardData>();
// if (str!="")
// {
// foreach (CardData one_CardData in CardDatas)
// {
// if (one_CardData.Name.Replace(str, "") != one_CardData.Name)
// {
// if ((one_CardData.Type | type) > 0)
// {
// return_valse.Add(one_CardData);
// }
// }
// }
// }
// return return_valse;
// }
// public List<CardData> search_advanced
// (
// UInt32 fil_type_temp,
// UInt32 fil_type_race_temp,
// UInt32 fil_type_attribute_temp,
// UInt32 fil_type_catagory_temp,
// string str,
// int atk=-233,
// int def=-233,
// int star=-233
// )
// {
// //if (fil_type_temp==0)
// //{
// // if (fil_type_race_temp == 0)
// // {
// // if (fil_type_attribute_temp == 0)
// // {
// // if (fil_type_catagory_temp == 0)
// // {
// // if (str=="")
// // {
// // if (atk==-233)
// // {
// // if (def == -233)
// // {
// // if (star == -233)
// // {
// // return new List<CardData>();
// // }
// // }
// // }
// // }
// // }
// // }
// // }
// //}
// UInt32 fil_type = fil_type_temp;
// if (fil_type == 0)
// {
// //fil_type = 0xffffffff;
// }
// UInt32 fil_type_race = fil_type_race_temp;
// if (fil_type_race == 0)
// {
// //fil_type_race = 0xffffffff;
// }
// UInt32 fil_type_attribute = fil_type_attribute_temp;
// if (fil_type_attribute == 0)
// {
// //fil_type_attribute = 0xffffffff;
// }
// UInt32 fil_type_catagory = fil_type_catagory_temp;
// if (fil_type_catagory == 0)
// {
// // fil_type_catagory = 0xffffffff;
// }
// List<CardData> return_valse = new List<CardData>();
// //if (str != "")
// {
// foreach (CardData one_CardData in CardDatas)
// {
// string string_name = one_CardData.Name;
// if (str == "" || string_name.Replace(str, "") != string_name || one_CardData.code.ToString() == str)
// {
// if ((one_CardData.Type & fil_type) == fil_type || (fil_type == 0))
// {
// if ((one_CardData.Race & fil_type_race) == fil_type_race || (fil_type_race == 0))
// {
// if (((UInt32)one_CardData.Attribute & fil_type_attribute) == fil_type_attribute || (fil_type_attribute == 0))
// {
// if ((one_CardData.Category & fil_type_catagory) == fil_type_catagory || (fil_type_catagory == 0))
// {
// if (one_CardData.Attack == atk || (atk == -233))
// {
// if (one_CardData.Defense == def || (def == -233))
// {
// if (one_CardData.Level == star || (star == -233))
// {
// return_valse.Add(one_CardData);
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// return_valse.Sort(comparisonOfCard());
// return return_valse;
// }
// private static Comparison<CardData> comparisonOfCard()
// {
// return (left, right) =>
// {
// int a = 1;
// if ((left.Type & 7) < (right.Type & 7))
// {
// a = -1;
// }
// else if ((left.Type & 7) > (right.Type & 7))
// {
// a = 1;
// }
// else
// {
// if (left.Level > right.Level)
// {
// a = -1;
// }
// else if (left.Level < right.Level)
// {
// a = 1;
// }
// else
// {
// if (left.Attack > right.Attack)
// {
// a = -1;
// }
// else if (left.Attack < right.Attack)
// {
// a = 1;
// }
// else
// {
// if ((left.Type >> 3) > (right.Type >> 3))
// {
// a = 1;
// }
// else if ((left.Type >> 3) < (right.Type >> 3))
// {
// a = -1;
// }
// else
// {
// if (left.Attribute > right.Attribute)
// {
// a = 1;
// }
// else if (left.Attribute < right.Attribute)
// {
// a = -1;
// }
// else
// {
// if (left.Race > right.Race)
// {
// a = 1;
// }
// else if (left.Race < right.Race)
// {
// a = -1;
// }
// else
// {
// if (left.Category > right.Category)
// {
// a = 1;
// }
// else if (left.Category < right.Category)
// {
// a = -1;
// }
// }
// }
// }
// }
// }
// }
// return a;
// };
// }
// public string get_description(UInt32 l)
// {
// string re = "";
// UInt32 code = l >> 4;
// UInt32 index = l & 0xf;
// try
// {
// re += GetById(code).Str[index];
// }
// catch (Exception e)
// {
// }
// return re;
// }
//}
Assets/old/UiverseAssests/UNIVERSE_FILES/CardDataManager.cs.meta
deleted
100644 → 0
View file @
d8033b10
fileFormatVersion: 2
guid: 94fe09e18fbcd1946af542ce761a3470
timeCreated: 1480605655
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs
deleted
100644 → 0
View file @
d8033b10
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text
;
Assets/old/UiverseAssests/UNIVERSE_FILES/databundle.cs.meta
deleted
100644 → 0
View file @
d8033b10
fileFormatVersion: 2
guid: 0c4a0e6dafcb7be4d9579cc54c1a3547
timeCreated: 1469113965
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs
deleted
100644 → 0
View file @
d8033b10
using
System
;
public
enum
game_function
{
MSG_RETRY
=
1
,
MSG_HINT
=
2
,
MSG_WAITING
=
3
,
MSG_START
=
4
,
MSG_WIN
=
5
,
MSG_UPDATE_DATA
=
6
,
MSG_UPDATE_CARD
=
7
,
MSG_REQUEST_DECK
=
8
,
MSG_SELECT_BATTLECMD
=
10
,
MSG_SELECT_IDLECMD
=
11
,
MSG_SELECT_EFFECTYN
=
12
,
MSG_SELECT_YESNO
=
13
,
MSG_SELECT_OPTION
=
14
,
MSG_SELECT_CARD
=
15
,
MSG_SELECT_CHAIN
=
16
,
MSG_SELECT_PLACE
=
18
,
MSG_SELECT_POSITION
=
19
,
MSG_SELECT_TRIBUTE
=
20
,
MSG_SORT_CHAIN
=
21
,
MSG_SELECT_COUNTER
=
22
,
MSG_SELECT_SUM
=
23
,
MSG_SELECT_DISFIELD
=
24
,
MSG_SORT_CARD
=
25
,
MSG_CONFIRM_DECKTOP
=
30
,
MSG_CONFIRM_CARDS
=
31
,
MSG_SHUFFLE_DECK
=
32
,
MSG_SHUFFLE_HAND
=
33
,
MSG_REFRESH_DECK
=
34
,
MSG_SWAP_GRAVE_DECK
=
35
,
MSG_SHUFFLE_SET_CARD
=
36
,
MSG_REVERSE_DECK
=
37
,
MSG_DECK_TOP
=
38
,
MSG_NEW_TURN
=
40
,
MSG_NEW_PHASE
=
41
,
MSG_MOVE
=
50
,
MSG_POS_CHANGE
=
53
,
MSG_SET
=
54
,
MSG_SWAP
=
55
,
MSG_FIELD_DISABLED
=
56
,
MSG_SUMMONING
=
60
,
MSG_SUMMONED
=
61
,
MSG_SPSUMMONING
=
62
,
MSG_SPSUMMONED
=
63
,
MSG_FLIPSUMMONING
=
64
,
MSG_FLIPSUMMONED
=
65
,
MSG_CHAINING
=
70
,
MSG_CHAINED
=
71
,
MSG_CHAIN_SOLVING
=
72
,
MSG_CHAIN_SOLVED
=
73
,
MSG_CHAIN_END
=
74
,
MSG_CHAIN_NEGATED
=
75
,
MSG_CHAIN_DISABLED
=
76
,
MSG_CARD_SELECTED
=
80
,
MSG_RANDOM_SELECTED
=
81
,
MSG_BECOME_TARGET
=
83
,
MSG_DRAW
=
90
,
MSG_DAMAGE
=
91
,
MSG_RECOVER
=
92
,
MSG_EQUIP
=
93
,
MSG_LPUPDATE
=
94
,
MSG_UNEQUIP
=
95
,
MSG_CARD_TARGET
=
96
,
MSG_CANCEL_TARGET
=
97
,
MSG_PAY_LPCOST
=
100
,
MSG_ADD_COUNTER
=
101
,
MSG_REMOVE_COUNTER
=
102
,
MSG_ATTACK
=
110
,
MSG_BATTLE
=
111
,
MSG_ATTACK_DISABLED
=
112
,
MSG_DAMAGE_STEP_START
=
113
,
MSG_DAMAGE_STEP_END
=
114
,
MSG_MISSED_EFFECT
=
120
,
MSG_BE_CHAIN_TARGET
=
121
,
MSG_CREATE_RELATION
=
122
,
MSG_RELEASE_RELATION
=
123
,
MSG_TOSS_COIN
=
130
,
MSG_TOSS_DICE
=
131
,
MSG_ANNOUNCE_RACE
=
140
,
MSG_ANNOUNCE_ATTRIB
=
141
,
MSG_ANNOUNCE_CARD
=
142
,
MSG_ANNOUNCE_NUMBER
=
143
,
MSG_CARD_HINT
=
160
,
MSG_TAG_SWAP
=
161
,
MSG_RELOAD_FIELD
=
162
,
MSG_AI_NAME
=
163
,
MSG_SHOW_HINT
=
164
,
MSG_MATCH_KILL
=
170
,
MSG_CUSTOM_MSG
=
180
,
MSG_HINT_EVENT
=
190
,
MSG_HINT_MESSAGE
=
191
,
MSG_HINT_SELECTMSG
=
192
,
MSG_HINT_OPSELECTED
=
193
,
MSG_HINT_EFFECT
=
194
,
MSG_HINT_RACE
=
195
,
MSG_HINT_ATTRIB
=
196
,
MSG_HINT_CODE
=
197
,
MSG_HINT_NUMBER
=
198
,
MSG_HINT_CARD
=
199
,
MSG_CHINT_TURN
=
200
,
MSG_CHINT_CARD
=
201
,
MSG_CHINT_RACE
=
202
,
MSG_CHINT_ATTRIBUTE
=
203
,
MSG_CHINT_NUMBER
=
204
,
MSG_CHINT_DESC_ADD
=
205
,
MSG_CHINT_DESC_REMOVE
=
206
,
MSG_QUERY_CODE
=
210
,
MSG_QUERY_POSITION
=
211
,
MSG_QUERY_ALIAS
=
212
,
MSG_QUERY_TYPE
=
213
,
MSG_QUERY_LEVEL
=
214
,
MSG_QUERY_RANK
=
215
,
MSG_QUERY_ATTRIBUTE
=
216
,
MSG_QUERY_RACE
=
217
,
MSG_QUERY_ATTACK
=
218
,
MSG_QUERY_DEFENSE
=
219
,
MSG_QUERY_BASE_ATTACK
=
220
,
MSG_QUERY_BASE_DEFENSE
=
221
,
MSG_QUERY_REASON
=
222
,
MSG_QUERY_REASON_CARD
=
223
,
MSG_QUERY_EQUIP_CARD
=
224
,
MSG_QUERY_TARGET_CARD
=
225
,
MSG_QUERY_OVERLAY_CARD
=
226
,
MSG_QUERY_COUNTERS
=
227
,
MSG_QUERY_OWNER
=
228
,
MSG_QUERY_IS_DISABLED
=
229
,
MSG_QUERY_IS_PUBLIC
=
230
,
MSG_QUERY_LSCALE
=
231
,
MSG_QUERY_RSCALE
=
232
,
}
public
enum
game_position
{
POS_FACEUP_ATTACK
=
0x1
,
POS_FACEDOWN_ATTACK
=
0x2
,
POS_FACEUP_DEFENSE
=
0x4
,
POS_FACEDOWN_DEFENSE
=
0x8
,
POS_FACEUP
=
0x5
,
POS_FACEDOWN
=
0xa
,
POS_ATTACK
=
0x3
,
POS_DEFENSE
=
0xc
,
}
public
enum
game_location
{
LOCATION_UNKNOWN
=
0x00
,
LOCATION_DECK
=
0x01
,
LOCATION_HAND
=
0x02
,
LOCATION_MZONE
=
0x04
,
LOCATION_SZONE
=
0x08
,
LOCATION_GRAVE
=
0x10
,
LOCATION_REMOVED
=
0x20
,
LOCATION_EXTRA
=
0x40
,
LOCATION_OVERLAY
=
0x80
,
LOCATION_ONFIELD
=
0x0c
,
LOCATION_FZONE
=
0x100
,
LOCATION_PZONE
=
0x200
,
search
=
0x800
,
}
public
enum
game_race
{
RACE_WARRIOR
=
0x1
,
RACE_SPELLCASTER
=
0x2
,
RACE_FAIRY
=
0x4
,
RACE_FIEND
=
0x8
,
RACE_ZOMBIE
=
0x10
,
RACE_MACHINE
=
0x20
,
RACE_AQUA
=
0x40
,
RACE_PYRO
=
0x80
,
RACE_ROCK
=
0x100
,
RACE_WINDBEAST
=
0x200
,
RACE_PLANT
=
0x400
,
RACE_INSECT
=
0x800
,
RACE_THUNDER
=
0x1000
,
RACE_DRAGON
=
0x2000
,
RACE_BEAST
=
0x4000
,
RACE_BEASTWARRIOR
=
0x8000
,
RACE_DINOSAUR
=
0x10000
,
RACE_FISH
=
0x20000
,
RACE_SEASERPENT
=
0x40000
,
RACE_REPTILE
=
0x80000
,
RACE_PSYCHO
=
0x100000
,
RACE_DEVINE
=
0x200000
,
RACE_CREATORGOD
=
0x400000
,
RACE_PHANTOMDRAGON
=
0x800000
,
}
public
enum
game_attributes
{
ATTRIBUTE_EARTH
=
0x01
,
ATTRIBUTE_WATER
=
0x02
,
ATTRIBUTE_FIRE
=
0x04
,
ATTRIBUTE_WIND
=
0x08
,
ATTRIBUTE_LIGHT
=
0x10
,
ATTRIBUTE_DARK
=
0x20
,
ATTRIBUTE_DEVINE
=
0x40
,
}
public
enum
game_type
{
TYPE_MONSTER
=
0x1
,
TYPE_SPELL
=
0x2
,
TYPE_TRAP
=
0x4
,
TYPE_NORMAL
=
0x10
,
TYPE_EFFECT
=
0x20
,
TYPE_FUSION
=
0x40
,
TYPE_RITUAL
=
0x80
,
TYPE_TRAPMONSTER
=
0x100
,
TYPE_SPIRIT
=
0x200
,
TYPE_UNION
=
0x400
,
TYPE_DUAL
=
0x800
,
TYPE_TUNER
=
0x1000
,
TYPE_SYNCHRO
=
0x2000
,
TYPE_TOKEN
=
0x4000
,
TYPE_QUICKPLAY
=
0x10000
,
TYPE_CONTINUOUS
=
0x20000
,
TYPE_EQUIP
=
0x40000
,
TYPE_FIELD
=
0x80000
,
TYPE_COUNTER
=
0x100000
,
TYPE_FLIP
=
0x200000
,
TYPE_TOON
=
0x400000
,
TYPE_XYZ
=
0x800000
,
TYPE_PENDULUM
=
0x1000000
,
link
=
0x4000000
,
}
public
enum
servant_type
{
OCGCORE_DEBUG
=
0
,
}
public
enum
game_phrases
{
PHASE_DRAW
=
0x01
,
PHASE_STANDBY
=
0x02
,
PHASE_MAIN1
=
0x04
,
PHASE_BATTLE_START
=
0x08
,
PHASE_BATTLE_STEP
=
0x10
,
PHASE_DAMAGE
=
0x20
,
PHASE_DAMAGE_CAL
=
0x40
,
PHASE_BATTLE
=
0x80
,
PHASE_MAIN2
=
0x100
,
PHASE_END
=
0x200
,
}
public
enum
TypeOfDuel
{
Normal
=
0x01
,
TAG
=
0x20
,
};
public
enum
StocMessage
{
GameMsg
=
0x1
,
ErrorMsg
=
0x2
,
SelectHand
=
0x3
,
SelectTp
=
0x4
,
HandResult
=
0x5
,
TpResult
=
0x6
,
ChangeSide
=
0x7
,
WaitingSide
=
0x8
,
CreateGame
=
0x11
,
JoinGame
=
0x12
,
TypeChange
=
0x13
,
LeaveGame
=
0x14
,
DuelStart
=
0x15
,
DuelEnd
=
0x16
,
Replay
=
0x17
,
TimeLimit
=
0x18
,
Chat
=
0x19
,
HsPlayerEnter
=
0x20
,
HsPlayerChange
=
0x21
,
HsWatchChange
=
0x22
,
jinglai
=
0x23
,
chuqu
=
0x24
}
public
enum
CtosMessage
{
Response
=
0x1
,
UpdateDeck
=
0x2
,
HandResult
=
0x3
,
TpResult
=
0x4
,
PlayerInfo
=
0x10
,
CreateGame
=
0x11
,
JoinGame
=
0x12
,
LeaveGame
=
0x13
,
Surrender
=
0x14
,
TimeConfirm
=
0x15
,
Chat
=
0x16
,
HsToDuelist
=
0x20
,
HsToObserver
=
0x21
,
HsReady
=
0x22
,
HsNotReady
=
0x23
,
HsKick
=
0x24
,
HsStart
=
0x25
}
public
enum
PlayerChange
{
Observe
=
0x8
,
Ready
=
0x9
,
NotReady
=
0xA
,
Leave
=
0xB
}
\ No newline at end of file
Assets/old/UiverseAssests/UNIVERSE_FILES/enums.cs.meta
deleted
100644 → 0
View file @
d8033b10
fileFormatVersion: 2
guid: ea6ed957719c1004a8fe5cb92cdce947
timeCreated: 1480605666
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs
deleted
100644 → 0
View file @
d8033b10
//using System;
//using System.IO;
//using UnityEngine;
//public struct point
//{
// public bool me;
// public game_location location;
// public int index;
// public game_position position;
// public int overlay_index;
// public point(bool m, game_location l, int i, game_position p = game_position.POS_FACEDOWN_ATTACK, int o = 0)
// {
// me = m;
// location = l;
// index = i;
// position = p;
// overlay_index = o;
// }
//}
//public struct CardData
//{
// public Int64 code;
// public Int32 Ot;
// public Int64 Alias;
// public Int64 SetCode;
// public Int64 Type;
// public Int32 Attack;
// public Int32 Defense;
// public Int64 Level;
// public Int64 Race;
// public Int32 Attribute;
// public Int64 Category;
// public string Name;
// public string Desc;
// public string tail;
// public string[] Str;
// public long LeftScale;
// public long RightScale;
// public CardData(int a = 0)
// {
// code = 0;
// Ot = 0;
// Alias = 0;
// SetCode = 0;
// Type = 0;
// Attack = 0;
// Defense = 0;
// Level = 0;
// Race = 0;
// Attribute = 0;
// Category = 0;
// Name = "";
// Desc = "";
// Str = new string[0];
// LeftScale = 0;
// RightScale = 0;
// tail = "";
// }
//}
Assets/old/UiverseAssests/UNIVERSE_FILES/structs.cs.meta
deleted
100644 → 0
View file @
d8033b10
fileFormatVersion: 2
guid: 34feabd62902b19489d8e3e2fe27d886
timeCreated: 1469113965
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/loader/card_string_helper.cs
View file @
ffb143dc
...
@@ -10,30 +10,30 @@
...
@@ -10,30 +10,30 @@
// public static string get_attribute_string(long a)
// public static string get_attribute_string(long a)
// {
// {
// string r = "";
// string r = "";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_EARTH
)) r += "地";
// if (differ(a, (long)
CardAttribute.Earth
)) r += "地";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_WATER
)) r += "水";
// if (differ(a, (long)
CardAttribute.Water
)) r += "水";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_FIRE
)) r += "炎";
// if (differ(a, (long)
CardAttribute.Fire
)) r += "炎";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_WIND
)) r += "风";
// if (differ(a, (long)
CardAttribute.Wind
)) r += "风";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_DARK
)) r += "暗";
// if (differ(a, (long)
CardAttribute.Dark
)) r += "暗";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_LIGHT
)) r += "光";
// if (differ(a, (long)
CardAttribute.Light
)) r += "光";
// if (differ(a, (long)
game_attributes.ATTRIBUTE_DEVINE
)) r += "神";
// if (differ(a, (long)
CardAttribute.Devine
)) r += "神";
// r += "属性";
// r += "属性";
// return r;
// return r;
// }
// }
// public static string get_type_string(int a)
// public static string get_type_string(int a)
// {
// {
// string r = "";
// string r = "";
// if (differ(a, (long)
game_type.TYPE_MONSTER
)) r += "怪物卡";
// if (differ(a, (long)
CardType.Monster
)) r += "怪物卡";
// if (differ(a, (long)
game_type.TYPE_SPELL
)) r += "魔法卡";
// if (differ(a, (long)
CardType.Spell
)) r += "魔法卡";
// if (differ(a, (long)
game_type.TYPE_TRAP
)) r += "陷阱卡";
// if (differ(a, (long)
CardType.Trap
)) r += "陷阱卡";
// return r;
// return r;
// }
// }
// public static string get_detailed_type_string(int a)
// public static string get_detailed_type_string(int a)
// {
// {
// string r = "";
// string r = "";
// if (differ(a, (long)
game_type.TYPE_MONSTER
)) r += "怪物卡";
// if (differ(a, (long)
CardType.Monster
)) r += "怪物卡";
// if (differ(a, (long)
game_type.TYPE_SPELL
)) r += "魔法卡";
// if (differ(a, (long)
CardType.Spell
)) r += "魔法卡";
// if (differ(a, (long)
game_type.TYPE_TRAP
)) r += "陷阱卡";
// if (differ(a, (long)
CardType.Trap
)) r += "陷阱卡";
// return r;
// return r;
// }
// }
// public static string get_race_string(long a)
// public static string get_race_string(long a)
...
@@ -79,25 +79,25 @@
...
@@ -79,25 +79,25 @@
// }
// }
// switch (p.location)
// switch (p.location)
// {
// {
// case
game_location.LOCATION_DECK
:
// case
CardLocation.Deck
:
// re += "卡组中的";
// re += "卡组中的";
// break;
// break;
// case
game_location.LOCATION_EXTRA
:
// case
CardLocation.Extra
:
// re += "额外卡组中的";
// re += "额外卡组中的";
// break;
// break;
// case
game_location.LOCATION_GRAVE
:
// case
CardLocation.Grave
:
// re += "墓地中的";
// re += "墓地中的";
// break;
// break;
// case
game_location.LOCATION_HAND
:
// case
CardLocation.Hand
:
// re += "手上的";
// re += "手上的";
// break;
// break;
// case
game_location.LOCATION_MZONE
:
// case
CardLocation.MonsterZone
:
// re += "前场的";
// re += "前场的";
// break;
// break;
// case
game_location.LOCATION_REMOVED
:
// case
CardLocation.Hand
:
// re += "被除外的";
// re += "被除外的";
// break;
// break;
// case
game_location.LOCATION_SZONE
:
// case
CardLocation.SpellZone
:
// re += "后场的";
// re += "后场的";
// break;
// break;
// }
// }
...
@@ -108,28 +108,28 @@
...
@@ -108,28 +108,28 @@
// }
// }
// switch (p.position)
// switch (p.position)
// {
// {
// case
game_position.POS_FACEDOWN_ATTACK
:
// case
CardPosition.FaceDownAttack
:
// re += "(里攻)";
// re += "(里攻)";
// break;
// break;
// case
game_position.POS_FACEDOWN
_DEFENSE:
// case
CardPosition.FaceDown
_DEFENSE:
// re += "(里守)";
// re += "(里守)";
// break;
// break;
// case
game_position.POS_FACEUP_ATTACK
:
// case
CardPosition.FaceUpAttack
:
// re += "(表攻)";
// re += "(表攻)";
// break;
// break;
// case
game_position.POS_FACEUP
_DEFENSE:
// case
CardPosition.FaceUp
_DEFENSE:
// re += "(表守)";
// re += "(表守)";
// break;
// break;
// }
// }
// if (p.location ==
game_location.LOCATION_UNKNOWN
) re = "(未知区域)";
// if (p.location ==
CardLocation.Unknown
) re = "(未知区域)";
// return re;
// return re;
// }
// }
// public static string get_name_string(CardData data)
// public static string get_name_string(CardData data)
// {
// {
// string re = "";
// string re = "";
// if (differ(data.Type, (long)
game_type.TYPE_MONSTER
)) re += "[ff8000]"+data.Name;
// if (differ(data.Type, (long)
CardType.Monster
)) re += "[ff8000]"+data.Name;
// else if (differ(data.Type, (long)
game_type.TYPE_SPELL
)) re += "[7FFF00]" + data.Name;
// else if (differ(data.Type, (long)
CardType.Spell
)) re += "[7FFF00]" + data.Name;
// else if (differ(data.Type, (long)
game_type.TYPE_TRAP
)) re += "[dda0dd]" + data.Name;
// else if (differ(data.Type, (long)
CardType.Trap
)) re += "[dda0dd]" + data.Name;
// else re += "[ff8000]" + data.Name;
// else re += "[ff8000]" + data.Name;
// re += "[-]";
// re += "[-]";
// return re;
// return re;
...
...
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