Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
9d02d41c
Commit
9d02d41c
authored
Jul 28, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add status for card
parent
1a685aa3
Pipeline
#28743
passed with stages
in 17 minutes and 10 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
7 deletions
+46
-7
src/common.ts
src/common.ts
+33
-0
src/service/duel/reloadField.ts
src/service/duel/reloadField.ts
+1
-0
src/service/duel/start.ts
src/service/duel/start.ts
+1
-0
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+10
-7
src/stores/cardStore.ts
src/stores/cardStore.ts
+1
-0
No files found.
src/common.ts
View file @
9d02d41c
...
@@ -453,3 +453,36 @@ function ifSetCard(setCodeToAnalyse: number, setCodeFromCard: number): boolean {
...
@@ -453,3 +453,36 @@ function ifSetCard(setCodeToAnalyse: number, setCodeFromCard: number): boolean {
return
res
;
return
res
;
}
}
export
const
STATUS_DISABLED
=
0x0001
;
// const STATUS_TO_ENABLE = 0x0002
// const STATUS_TO_DISABLE = 0x0004
// const STATUS_PROC_COMPLETE = 0x0008
// const STATUS_SET_TURN = 0x0010
// const STATUS_NO_LEVEL = 0x0020
// const STATUS_BATTLE_RESULT = 0x0040
// const STATUS_SPSUMMON_STEP = 0x0080
// const STATUS_FORM_CHANGED = 0x0100
// const STATUS_SUMMONING = 0x0200
// const STATUS_EFFECT_ENABLED = 0x0400
// const STATUS_SUMMON_TURN = 0x0800
// const STATUS_DESTROY_CONFIRMED = 0x1000
// const STATUS_LEAVE_CONFIRMED = 0x2000
// const STATUS_BATTLE_DESTROYED = 0x4000
// const STATUS_COPYING_EFFECT = 0x8000
// const STATUS_CHAINING = 0x10000
// const STATUS_SUMMON_DISABLED = 0x20000
// const STATUS_ACTIVATE_DISABLED = 0x40000
// const STATUS_EFFECT_REPLACED = 0x80000
// const STATUS_FLIP_SUMMONING = 0x100000
// const STATUS_ATTACK_CANCELED = 0x200000
// const STATUS_INITIALIZING = 0x400000
// const STATUS_TO_HAND_WITHOUT_CONFIRM = 0x800000
// const STATUS_JUST_POS = 0x1000000
// const STATUS_CONTINUOUS_POS = 0x2000000
export
const
STATUS_FORBIDDEN
=
0x4000000
;
// const STATUS_ACT_FROM_HAND = 0x8000000
// const STATUS_OPPO_BATTLE = 0x10000000
// const STATUS_FLIP_SUMMON_TURN = 0x20000000
// const STATUS_SPSUMMON_TURN = 0x40000000
// const STATUS_FLIP_SUMMON_DISABLED = 0x80000000
src/service/duel/reloadField.ts
View file @
9d02d41c
...
@@ -41,6 +41,7 @@ export default (container: Container, field: MsgReloadField) => {
...
@@ -41,6 +41,7 @@ export default (container: Container, field: MsgReloadField) => {
selectable
:
false
,
selectable
:
false
,
selected
:
false
,
selected
:
false
,
},
},
status
:
0
,
}),
}),
),
),
)
)
...
...
src/service/duel/start.ts
View file @
9d02d41c
...
@@ -77,6 +77,7 @@ export default async (
...
@@ -77,6 +77,7 @@ export default async (
selectable
:
false
,
selectable
:
false
,
selected
:
false
,
selected
:
false
,
},
},
status
:
0
,
}),
}),
),
),
),
),
...
...
src/service/duel/updateData.ts
View file @
9d02d41c
...
@@ -16,7 +16,7 @@ export default async (container: Container, updateData: MsgUpdateData) => {
...
@@ -16,7 +16,7 @@ export default async (container: Container, updateData: MsgUpdateData) => {
.
filter
((
card
)
=>
card
.
location
.
sequence
===
sequence
)
.
filter
((
card
)
=>
card
.
location
.
sequence
===
sequence
)
.
at
(
0
);
.
at
(
0
);
if
(
target
)
{
if
(
target
)
{
if
(
action
?
.
code
>
0
&&
target
.
code
===
0
)
{
if
(
action
.
code
>
0
&&
target
.
code
===
0
)
{
// 当本地code为0且action的code大于0时,才从db加载整个meta信息
// 当本地code为0且action的code大于0时,才从db加载整个meta信息
const
newMeta
=
fetchCard
(
action
.
code
);
const
newMeta
=
fetchCard
(
action
.
code
);
target
.
code
=
action
.
code
;
target
.
code
=
action
.
code
;
...
@@ -32,27 +32,30 @@ export default async (container: Container, updateData: MsgUpdateData) => {
...
@@ -32,27 +32,30 @@ export default async (container: Container, updateData: MsgUpdateData) => {
await
callCardMove
(
target
.
uuid
);
await
callCardMove
(
target
.
uuid
);
}
}
}
}
if
(
action
?
.
type_
>=
0
)
{
if
(
action
.
type_
>=
0
)
{
meta
.
data
.
type
=
action
.
type_
;
meta
.
data
.
type
=
action
.
type_
;
if
(
action
.
type_
&
TYPE_TOKEN
)
{
if
(
action
.
type_
&
TYPE_TOKEN
)
{
target
.
isToken
=
true
;
target
.
isToken
=
true
;
}
}
}
}
if
(
action
?
.
level
>=
0
)
{
if
(
action
.
level
>=
0
)
{
meta
.
data
.
level
=
action
.
level
;
meta
.
data
.
level
=
action
.
level
;
}
}
if
(
action
?
.
attribute
>=
0
)
{
if
(
action
.
attribute
>=
0
)
{
meta
.
data
.
attribute
=
action
.
attribute
;
meta
.
data
.
attribute
=
action
.
attribute
;
}
}
if
(
action
?
.
race
>=
0
)
{
if
(
action
.
race
>=
0
)
{
meta
.
data
.
race
=
action
.
race
;
meta
.
data
.
race
=
action
.
race
;
}
}
if
(
action
?
.
attack
>=
0
)
{
if
(
action
.
attack
>=
0
)
{
meta
.
data
.
atk
=
action
.
attack
;
meta
.
data
.
atk
=
action
.
attack
;
}
}
if
(
action
?
.
defense
>=
0
)
{
if
(
action
.
defense
>=
0
)
{
meta
.
data
.
def
=
action
.
defense
;
meta
.
data
.
def
=
action
.
defense
;
}
}
if
(
action
.
status
>=
0
)
{
target
.
status
=
action
.
status
;
}
// TODO: counters
// TODO: counters
}
else
{
}
else
{
console
.
warn
(
console
.
warn
(
...
...
src/stores/cardStore.ts
View file @
9d02d41c
...
@@ -22,6 +22,7 @@ export interface CardType {
...
@@ -22,6 +22,7 @@ export interface CardType {
selected
:
boolean
;
// 是否已经被选择
selected
:
boolean
;
// 是否已经被选择
response
?:
number
;
// 被选择时发送给服务器的值
response
?:
number
;
// 被选择时发送给服务器的值
};
};
status
:
number
;
// Current status, STATUS_DISABLED, etc.
}
}
export
class
CardStore
implements
NeosStore
{
export
class
CardStore
implements
NeosStore
{
...
...
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