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
9c1b4ca5
Commit
9c1b4ca5
authored
Jul 23, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4ad32378
Pipeline
#4265
canceled with stages
in 53 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
Assets/YGOSharp/Card.cs
Assets/YGOSharp/Card.cs
+19
-2
Assets/YGOSharp/CardsManager.cs
Assets/YGOSharp/CardsManager.cs
+1
-1
No files found.
Assets/YGOSharp/Card.cs
View file @
9c1b4ca5
...
...
@@ -119,9 +119,9 @@ namespace YGOSharp
bool
allow_ocg
=
hostInfoRule
==
0
||
hostInfoRule
==
2
;
// OCG can be used in OCG and OT duels
bool
allow_tcg
=
hostInfoRule
==
1
||
hostInfoRule
==
2
;
// TCG can be used in TCG and OT duels
bool
allow_ccg
=
hostInfoRule
==
0
||
hostInfoRule
==
4
||
hostInfoRule
==
2
;
// CCG can be used in OCG, CCG and OT duels
if
(!
allow_ocg
&&
(
cardOt
&
0x3
==
0x1
))
if
(!
allow_ocg
&&
(
(
cardOt
&
0x3
)
==
0x1
))
return
false
;
if
(!
allow_tcg
&&
(
cardOt
&
0x3
==
0x2
))
if
(!
allow_tcg
&&
(
(
cardOt
&
0x3
)
==
0x2
))
return
false
;
if
(
hostInfoRule
==
4
&&
!(
cardOt
&
0x8
)
&&
(
cardOt
&
0x3
))
{
// in CCG duels, cards labeled with ither OCG or TCG, but not CCG, would not be allowed.
return
false
;
...
...
@@ -129,6 +129,23 @@ namespace YGOSharp
return
true
;
}
public
bool
IsCanSearchInRule
(
int
hostInfoRule
)
{
if
(
hostInfoRule
==
-
233
)
return
true
;
int
cardOt
=
this
.
Ot
;
if
(
hostInfoRule
==
0
&&
(
cardOt
&
0x3
)
!=
0x1
)
// ocg
return
false
;
if
(
hostInfoRule
==
1
&&
(
cardOt
&
0x3
)
!=
0x2
)
// tcg
return
false
;
if
(
hostInfoRule
==
2
&&
(
cardOt
&
0x3
)
!=
0x3
)
// ot
return
false
;
if
(
hostInfoRule
==
3
&&
(
cardOt
&
0x4
)
!=
0x4
)
// DIY
return
false
;
if
(
hostInfoRule
==
4
&&
(
cardOt
&
0x8
)
!=
0x8
)
// ccg
return
false
;
return
true
;
}
internal
Card
(
IDataRecord
reader
)
{
this
.
Str
=
new
string
[
16
];
...
...
Assets/YGOSharp/CardsManager.cs
View file @
9c1b4ca5
...
...
@@ -156,7 +156,7 @@ namespace YGOSharp
{
if
(
getBAN
==
-
233
||
banlist
==
null
||
banlist
.
GetQuantity
(
card
.
Id
)
==
getBAN
)
{
if
(
card
.
IsCan
Play
InRule
(
getOT
))
if
(
card
.
IsCan
Search
InRule
(
getOT
))
{
if
(
getPack
==
""
||
card
.
packFullName
==
getPack
)
{
...
...
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