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
464e5d9d
Commit
464e5d9d
authored
Apr 06, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync YGOSharp
parent
0c736027
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
72 additions
and
51 deletions
+72
-51
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+27
-27
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+5
-5
Assets/YGOSharp/Card.cs
Assets/YGOSharp/Card.cs
+6
-1
Assets/YGOSharp/Enums/CardLinkMarker.cs
Assets/YGOSharp/Enums/CardLinkMarker.cs
+15
-0
Assets/YGOSharp/Enums/CardLinkMarker.cs.meta
Assets/YGOSharp/Enums/CardLinkMarker.cs.meta
+12
-0
Assets/YGOSharp/Enums/CardPosition.cs
Assets/YGOSharp/Enums/CardPosition.cs
+0
-13
Assets/YGOSharp/Enums/CardRace.cs
Assets/YGOSharp/Enums/CardRace.cs
+3
-1
Assets/YGOSharp/Enums/CardType.cs
Assets/YGOSharp/Enums/CardType.cs
+2
-2
Assets/YGOSharp/Enums/GameMessage.cs
Assets/YGOSharp/Enums/GameMessage.cs
+2
-2
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
464e5d9d
...
...
@@ -1830,7 +1830,7 @@ public class Ocgcore : ServantWithCardDescription
//printDuelLog(derectattack);
}
break
;
case
GameMessage
.
AttackDiabled
:
case
GameMessage
.
AttackDi
s
abled
:
ES_hint
=
InterString
.
Get
(
"攻击被无效时"
);
//printDuelLog(InterString.Get("攻击被无效"));
break
;
...
...
@@ -3402,7 +3402,7 @@ public class Ocgcore : ServantWithCardDescription
gameField
.
setHint
(
InterString
.
Get
(
"请选择卡片。"
)
+
" "
+
ES_min
.
ToString
()
+
"-"
+
ES_max
.
ToString
());
}
break
;
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
if
(
inIgnoranceReplay
()
||
inTheWorld
())
{
break
;
...
...
@@ -5108,7 +5108,7 @@ public class Ocgcore : ServantWithCardDescription
Sleep
(
40
);
}
break
;
case
GameMessage
.
AttackDiabled
:
case
GameMessage
.
AttackDi
s
abled
:
//removeAttackHandler();
break
;
case
GameMessage
.
DamageStepStart
:
...
...
@@ -5888,7 +5888,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
}
else
if
(
currentMessage
!=
GameMessage
.
SelectUnselect
Card
)
else
if
(
currentMessage
!=
GameMessage
.
SelectUnselect
)
{
gameInfo
.
removeHashedButton
(
"sendSelected"
);
}
...
...
@@ -5900,7 +5900,7 @@ public class Ocgcore : ServantWithCardDescription
private
void
getSelectableCards
()
{
if
(
currentMessage
==
GameMessage
.
SelectCard
||
currentMessage
==
GameMessage
.
SelectUnselect
Card
)
if
(
currentMessage
==
GameMessage
.
SelectCard
||
currentMessage
==
GameMessage
.
SelectUnselect
)
{
for
(
int
i
=
0
;
i
<
allCardsInSelectMessage
.
Count
;
i
++)
{
...
...
@@ -6209,7 +6209,7 @@ public class Ocgcore : ServantWithCardDescription
switch
(
currentMessage
)
{
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
case
GameMessage
.
SelectTribute
:
int
c
=
ES_min
;
if
(
cardsSelectable
.
Count
<
c
)
...
...
@@ -6249,11 +6249,11 @@ public class Ocgcore : ServantWithCardDescription
switch
(
currentMessage
)
{
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
case
GameMessage
.
SelectTribute
:
case
GameMessage
.
SelectSum
:
m
=
new
BinaryMaster
();
if
(
currentMessage
==
GameMessage
.
SelectUnselect
Card
&&
cardsSelected
.
Count
==
0
)
if
(
currentMessage
==
GameMessage
.
SelectUnselect
&&
cardsSelected
.
Count
==
0
)
{
m
.
writer
.
Write
((
Int32
)(-
1
));
sendReturn
(
m
.
get
());
...
...
@@ -6814,10 +6814,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
-
1
,
curLie
-
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
youshang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
TopRight
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuoxia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
BottomLeft
)
)
lighted
=
true
;
}
...
...
@@ -6826,10 +6826,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
,
curLie
-
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
you
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Right
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuo
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Left
)
)
lighted
=
true
;
}
if
(
curLie
-
1
>=
0
)
...
...
@@ -6837,10 +6837,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
+
1
,
curLie
-
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
youxia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
BottomRight
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuoshang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
TopLeft
)
)
lighted
=
true
;
}
if
(
curHang
-
1
>=
0
)
...
...
@@ -6848,10 +6848,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
-
1
,
curLie
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
shang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Top
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
xia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Bottom
)
)
lighted
=
true
;
}
...
...
@@ -6859,10 +6859,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
+
1
,
curLie
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
xia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Bottom
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
shang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Top
)
)
lighted
=
true
;
}
if
(
curHang
-
1
>=
0
)
...
...
@@ -6870,10 +6870,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
-
1
,
curLie
+
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuoshang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
TopLeft
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
youxia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
BottomRight
)
)
lighted
=
true
;
}
...
...
@@ -6881,10 +6881,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
,
curLie
+
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuo
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Left
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
you
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
Right
)
)
lighted
=
true
;
}
...
...
@@ -6892,10 +6892,10 @@ public class Ocgcore : ServantWithCardDescription
{
gameCard
card
=
vvv
[
curHang
+
1
,
curLie
+
1
];
if
(
card
.
p
.
controller
==
0
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
zuoxia
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
BottomLeft
)
)
lighted
=
true
;
if
(
card
.
p
.
controller
==
1
)
if
(
(
card
.
get_data
().
rDefense
&
CardFac
.
youshang
)
>
0
)
if
(
card
.
get_data
().
HasLinkMarker
(
CardLinkMarker
.
TopRight
)
)
lighted
=
true
;
}
...
...
@@ -8246,7 +8246,7 @@ public class Ocgcore : ServantWithCardDescription
break
;
case
GameMessage
.
SelectCard
:
break
;
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
break
;
case
GameMessage
.
SelectChain
:
break
;
...
...
@@ -8318,7 +8318,7 @@ public class Ocgcore : ServantWithCardDescription
case
GameMessage
.
SelectEffectYn
:
case
GameMessage
.
SelectYesNo
:
case
GameMessage
.
SelectCard
:
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
case
GameMessage
.
SelectTribute
:
case
GameMessage
.
SelectChain
:
clearAllShowedB
=
true
;
...
...
@@ -8537,7 +8537,7 @@ public class Ocgcore : ServantWithCardDescription
realizeCardsForSelect
();
}
break
;
case
GameMessage
.
SelectUnselect
Card
:
case
GameMessage
.
SelectUnselect
:
if
(
card
.
forSelect
)
{
cardsSelected
.
Add
(
card
);
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
464e5d9d
...
...
@@ -748,11 +748,11 @@ public class DeckManager : ServantWithCardDescription
}
if
(
ifType
(
GameStringManager
.
get_unsafe
(
1075
)))
{
returnValue
|=
(
UInt32
)
CardType
.
Monster
+
(
UInt32
)
CardType
.
sp
;
returnValue
|=
(
UInt32
)
CardType
.
Monster
+
(
UInt32
)
CardType
.
SpSummon
;
}
if
(
ifType
(
GameStringManager
.
get_unsafe
(
1076
)))
{
returnValue
|=
(
UInt32
)
CardType
.
Monster
+
(
UInt32
)
CardType
.
l
ink
;
returnValue
|=
(
UInt32
)
CardType
.
Monster
+
(
UInt32
)
CardType
.
L
ink
;
}
}
if
(
UIPopupList_main
.
value
==
GameStringManager
.
get_unsafe
(
1313
))
...
...
@@ -1354,7 +1354,7 @@ public class DeckManager : ServantWithCardDescription
||
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
||
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
l
ink
)
>
0
(
MonoCardInDeckManager_
.
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
L
ink
)
>
0
)
{
deck
.
IExtra
.
Add
(
MonoCardInDeckManager_
);
...
...
@@ -1393,7 +1393,7 @@ public class DeckManager : ServantWithCardDescription
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
||
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
l
ink
)
>
0
(
data
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
L
ink
)
>
0
)
{
deck
.
IExtra
.
Add
(
card
);
...
...
@@ -1578,7 +1578,7 @@ public class DeckManager : ServantWithCardDescription
||
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
Xyz
)
>
0
||
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
l
ink
)
>
0
(
deckTemp
[
i
].
cardData
.
Type
&
(
UInt32
)
YGOSharp
.
OCGWrapper
.
Enums
.
CardType
.
L
ink
)
>
0
)
{
deck
.
IExtra
.
Add
(
deckTemp
[
i
]);
...
...
Assets/YGOSharp/Card.cs
View file @
464e5d9d
...
...
@@ -100,9 +100,14 @@ namespace YGOSharp
return
((
Type
&
(
int
)
type
)
!=
0
);
}
public
bool
HasLinkMarker
(
CardLinkMarker
dir
)
{
return
(
rDefense
&
(
int
)
dir
)
!=
0
;
}
public
bool
IsExtraCard
()
{
return
(
HasType
(
CardType
.
Fusion
)
||
HasType
(
CardType
.
Synchro
)
||
HasType
(
CardType
.
Xyz
)
||
HasType
(
CardType
.
l
ink
));
return
(
HasType
(
CardType
.
Fusion
)
||
HasType
(
CardType
.
Synchro
)
||
HasType
(
CardType
.
Xyz
)
||
HasType
(
CardType
.
L
ink
));
}
internal
Card
(
IDataRecord
reader
)
...
...
Assets/YGOSharp/Enums/CardLinkMarker.cs
0 → 100644
View file @
464e5d9d
namespace
YGOSharp.OCGWrapper.Enums
{
public
enum
CardLinkMarker
{
BottomLeft
=
0x01
,
Bottom
=
0x02
,
BottomRight
=
0x04
,
Left
=
0x08
,
Right
=
0x20
,
TopLeft
=
0x40
,
Top
=
0x80
,
TopRight
=
0x100
}
}
\ No newline at end of file
Assets/YGOSharp/Enums/CardLinkMarker.cs.meta
0 → 100644
View file @
464e5d9d
fileFormatVersion: 2
guid: 15d8ac695c446594ea28abe34e500bf1
timeCreated: 1554560396
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/YGOSharp/Enums/CardPosition.cs
View file @
464e5d9d
...
...
@@ -12,16 +12,3 @@
Defence
=
0xC
}
}
class
CardFac
{
public
static
int
zuoxia
=
1
<<
(
1
-
1
);
public
static
int
xia
=
1
<<
(
2
-
1
);
public
static
int
youxia
=
1
<<
(
3
-
1
);
public
static
int
zuo
=
1
<<
(
4
-
1
);
public
static
int
you
=
1
<<
(
6
-
1
);
public
static
int
zuoshang
=
1
<<
(
7
-
1
);
public
static
int
shang
=
1
<<
(
8
-
1
);
public
static
int
youshang
=
1
<<
(
9
-
1
);
}
\ No newline at end of file
Assets/YGOSharp/Enums/CardRace.cs
View file @
464e5d9d
...
...
@@ -23,6 +23,8 @@
SeaSerpent
=
0x40000
,
Reptile
=
0x80000
,
Psycho
=
0x100000
,
DivineBeast
=
0x200000
DivineBeast
=
0x200000
,
Wyrm
=
0x800000
,
Cyberse
=
0x1000000
}
}
\ No newline at end of file
Assets/YGOSharp/Enums/CardType.cs
View file @
464e5d9d
...
...
@@ -25,7 +25,7 @@
Toon
=
0x400000
,
Xyz
=
0x800000
,
Pendulum
=
0x1000000
,
sp
=
0x2000000
,
link
=
0x4000000
,
SpSummon
=
0x2000000
,
Link
=
0x4000000
}
}
\ No newline at end of file
Assets/YGOSharp/Enums/GameMessage.cs
View file @
464e5d9d
...
...
@@ -25,7 +25,7 @@
SelectSum
=
23
,
SelectDisfield
=
24
,
SortCard
=
25
,
SelectUnselect
Card
=
26
,
SelectUnselect
=
26
,
ConfirmDecktop
=
30
,
ConfirmCards
=
31
,
ShuffleDeck
=
32
,
...
...
@@ -73,7 +73,7 @@
RemoveCounter
=
102
,
Attack
=
110
,
Battle
=
111
,
AttackDiabled
=
112
,
AttackDi
s
abled
=
112
,
DamageStepStart
=
113
,
DamageStepEnd
=
114
,
MissedEffect
=
120
,
...
...
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