Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
a9f5389b
Commit
a9f5389b
authored
Feb 21, 2020
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡查关键字可同时查询名字和效果
怪兽分类新增非效果怪兽
parent
a21ae230
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
49 deletions
+69
-49
mobile/assets/data/conf/strings.conf
mobile/assets/data/conf/strings.conf
+1
-0
mobile/assets_en/data/conf/strings.conf
mobile/assets_en/data/conf/strings.conf
+1
-0
mobile/assets_ko/data/conf/strings.conf
mobile/assets_ko/data/conf/strings.conf
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/loader/CardSearchInfo.java
.../main/java/cn/garymb/ygomobile/loader/CardSearchInfo.java
+64
-48
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
.../main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
+1
-1
mobile/src/main/java/ocgcore/enums/CardType.java
mobile/src/main/java/ocgcore/enums/CardType.java
+1
-0
No files found.
mobile/assets/data/conf/strings.conf
View file @
a9f5389b
...
...
@@ -205,6 +205,7 @@
!
system
1074
灵摆
!
system
1075
特殊召唤
!
system
1076
连接
!
system
1077
非效果怪兽
!
system
1080
(
N
/
A
)
!
system
1081
额外怪兽区
#GUI
...
...
mobile/assets_en/data/conf/strings.conf
View file @
a9f5389b
...
...
@@ -205,6 +205,7 @@
!
system
1074
Pendulum
!
system
1075
Special
Summon
!
system
1076
Link
!
system
1077
非效果怪兽
!
system
1080
(
N
/
A
)
!
system
1081
Extra
Monster
Zone
#GUI
...
...
mobile/assets_ko/data/conf/strings.conf
View file @
a9f5389b
...
...
@@ -205,6 +205,7 @@
!
system
1074
펜듈럼
!
system
1075
특수 소환
!
system
1076
링크
!
system
1077
非效果怪兽
!
system
1080
(
N
/
A
)
!
system
1081
엑스트라 몬스터 존
#GUI
...
...
mobile/src/main/java/cn/garymb/ygomobile/loader/CardSearchInfo.java
View file @
a9f5389b
...
...
@@ -41,18 +41,21 @@ class CardSearchInfo {
}
}
else
if
(!
TextUtils
.
isEmpty
(
prefixWord
)
&&
!
TextUtils
.
isEmpty
(
suffixWord
))
{
boolean
has
=
false
;
int
i1
=-
1
,
i2
=-
1
,
i3
,
i4
;
if
(
card
.
Name
!=
null
)
{
int
i1
=
card
.
Name
.
indexOf
(
prefixWord
);
int
i2
=
card
.
Name
.
indexOf
(
suffixWord
);
if
(
i1
>=
0
&&
i2
>=
0
&&
i1
<
i2
)
{
i1
=
card
.
Name
.
indexOf
(
prefixWord
);
i2
=
card
.
Name
.
indexOf
(
suffixWord
);
if
(
i1
>=
0
&&
i2
>=
0
)
{
has
=
true
;
}
}
if
(!
has
)
{
if
(
card
.
Desc
!=
null
)
{
int
i1
=
card
.
Desc
.
indexOf
(
prefixWord
);
int
i2
=
card
.
Desc
.
indexOf
(
suffixWord
);
if
(
i1
>=
0
&&
i2
>=
0
&&
i1
<
i2
)
{
i3
=
card
.
Desc
.
indexOf
(
prefixWord
);
i4
=
card
.
Desc
.
indexOf
(
suffixWord
);
if
((
i3
>=
0
&&
i4
>=
0
)
||(
i3
>=
0
&&
i2
>=
0
)
||(
i1
>=
0
&&
i4
>=
0
)){
has
=
true
;
}
}
...
...
@@ -127,51 +130,64 @@ class CardSearchInfo {
if
(
types
.
length
>
0
)
{
boolean
st
=
false
;
for
(
long
cardType
:
types
)
{
if
(
cardType
==
CardType
.
Spell
.
value
()
||
cardType
==
CardType
.
Trap
.
value
())
{
st
=
true
;
break
;
}
}
for
(
long
type
:
types
)
{
if
(
type
>
0
)
{
if
(
st
)
{
//魔法
if
(
type
==
CardType
.
Normal
.
value
())
{
//通常
if
(
card
.
isType
(
CardType
.
Normal
))
{
//带通常的魔法陷阱
if
(
card
.
Type
!=
(
CardType
.
Spell
.
value
()
|
CardType
.
Normal
.
value
())
&&
card
.
Type
!=
(
CardType
.
Trap
.
value
()
|
CardType
.
Normal
.
value
()))
{
return
false
;
}
}
else
{
//只有魔法/陷阱
if
(
card
.
Type
!=
CardType
.
Spell
.
value
()
&&
card
.
Type
!=
CardType
.
Trap
.
value
())
return
false
;
}
continue
;
}
}
if
((
card
.
Type
&
type
)
!=
type
)
{
return
false
;
}
//如果是效果怪兽
if
(
type
==
CardType
.
Effect
.
value
())
{
if
((
card
.
Type
&
CardType
.
Effect
.
value
())
==
CardType
.
Effect
.
value
())
{
//如果是融合/仪式/同调/超量/连接
if
((
card
.
Type
&
CardType
.
Fusion
.
value
())
==
CardType
.
Fusion
.
value
()
||
(
card
.
Type
&
CardType
.
Ritual
.
value
())
==
CardType
.
Ritual
.
value
()
||
(
card
.
Type
&
CardType
.
Synchro
.
value
())
==
CardType
.
Synchro
.
value
()
||
(
card
.
Type
&
CardType
.
Xyz
.
value
())
==
CardType
.
Xyz
.
value
()
||
(
card
.
Type
&
CardType
.
Link
.
value
())
==
CardType
.
Link
.
value
()
// if (cardType == CardType.Spell.value() || cardType == CardType.Trap.value()) {
// st = true;
// break;
// }
//非效果怪兽
if
(
cardType
==
CardType
.
No_Effect
.
value
()){
//如果不是融合/仪式/同调/超量/连接
if
((
card
.
Type
&
CardType
.
Fusion
.
value
())
!=
CardType
.
Fusion
.
value
()
&&
(
card
.
Type
&
CardType
.
Ritual
.
value
())
!=
CardType
.
Ritual
.
value
()
&&
(
card
.
Type
&
CardType
.
Synchro
.
value
())
!=
CardType
.
Synchro
.
value
()
&&
(
card
.
Type
&
CardType
.
Xyz
.
value
())
!=
CardType
.
Xyz
.
value
()
&&
(
card
.
Type
&
CardType
.
Link
.
value
())
!=
CardType
.
Link
.
value
()
)
return
false
;
}
}
return
false
;
}
else
if
((
card
.
Type
&
cardType
)
!=
cardType
)
{
return
false
;
}
}
//
// for (long type : types) {
// if (type > 0) {
// if (st) {
// //魔法
// if (type == CardType.Normal.value()) {
// //通常
// if (card.isType(CardType.Normal)) {
// //带通常的魔法陷阱
// if (card.Type != (CardType.Spell.value() | CardType.Normal.value())
// && card.Type != (CardType.Trap.value() | CardType.Normal.value())) {
// return false;
// }
// } else {
// //只有魔法/陷阱
// if (card.Type != CardType.Spell.value() && card.Type != CardType.Trap.value())
// return false;
// }
// continue;
// }
// }
// if ((card.Type & type) != type) {
// return false;
// }
// //如果是效果怪兽
// if (type == CardType.Effect.value()) {
// if ((card.Type & CardType.Effect.value()) == CardType.Effect.value()) {
// //如果是融合/仪式/同调/超量/连接
// if ((card.Type & CardType.Fusion.value()) == CardType.Fusion.value()
// || (card.Type & CardType.Ritual.value()) == CardType.Ritual.value()
// || (card.Type & CardType.Synchro.value()) == CardType.Synchro.value()
// || (card.Type & CardType.Xyz.value()) == CardType.Xyz.value()
// || (card.Type & CardType.Link.value()) == CardType.Link.value()
// )
// return false;
// }
// }
//
// }
// }
}
//TODO setcode
if
(
setcode
>
0
)
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
View file @
a9f5389b
...
...
@@ -252,7 +252,7 @@ public class CardSearcher implements View.OnClickListener {
initTypeSpinners
(
typeSpinner
,
new
CardType
[]{
CardType
.
None
,
CardType
.
Monster
,
CardType
.
Spell
,
CardType
.
Trap
});
initTypeSpinners
(
typeMonsterSpinner
,
new
CardType
[]{
CardType
.
None
,
CardType
.
Normal
,
CardType
.
Effect
,
CardType
.
Fusion
,
CardType
.
Ritual
,
CardType
.
Synchro
,
CardType
.
Pendulum
,
CardType
.
Xyz
,
CardType
.
Link
,
CardType
.
Spirit
,
CardType
.
Union
,
CardType
.
Dual
,
CardType
.
Tuner
,
CardType
.
Flip
,
CardType
.
Toon
,
CardType
.
Sp_Summon
,
CardType
.
Token
CardType
.
Dual
,
CardType
.
Tuner
,
CardType
.
Flip
,
CardType
.
Toon
,
CardType
.
Sp_Summon
,
CardType
.
Token
,
CardType
.
No_Effect
});
initTypeSpinners
(
typeMonsterSpinner2
,
new
CardType
[]{
CardType
.
None
,
CardType
.
Pendulum
,
CardType
.
Tuner
});
...
...
mobile/src/main/java/ocgcore/enums/CardType.java
View file @
a9f5389b
...
...
@@ -10,6 +10,7 @@ public enum CardType {
Pendulum
(
0x1000000
L
),
Xyz
(
0x800000
L
),
Link
(
0x4000000
L
),
No_Effect
(
0x8000000
L
),
Spirit
(
0x200
),
Union
(
0x400
),
...
...
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