Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
Windbot-408
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
神之吹息
Windbot-408
Commits
5cfb5b78
Commit
5cfb5b78
authored
May 25, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix OnMove, handle overlay correctly
parent
9a3e147a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
Game/Duel.cs
Game/Duel.cs
+2
-1
Game/GameBehavior.cs
Game/GameBehavior.cs
+2
-1
No files found.
Game/Duel.cs
View file @
5cfb5b78
...
@@ -115,10 +115,11 @@ namespace WindBot.Game
...
@@ -115,10 +115,11 @@ namespace WindBot.Game
}
}
}
}
public
void
AddCard
(
CardLocation
loc
,
ClientCard
card
,
int
player
,
int
zone
,
int
pos
)
public
void
AddCard
(
CardLocation
loc
,
ClientCard
card
,
int
player
,
int
zone
,
int
pos
,
int
id
)
{
{
card
.
Location
=
loc
;
card
.
Location
=
loc
;
card
.
Position
=
pos
;
card
.
Position
=
pos
;
card
.
SetId
(
id
);
switch
(
loc
)
switch
(
loc
)
{
{
case
CardLocation
.
Hand
:
case
CardLocation
.
Hand
:
...
...
Game/GameBehavior.cs
View file @
5cfb5b78
...
@@ -469,6 +469,7 @@ namespace WindBot.Game
...
@@ -469,6 +469,7 @@ namespace WindBot.Game
card
=
_duel
.
GetCard
(
previousControler
,
(
CardLocation
)
previousLocation
,
previousSequence
);
card
=
_duel
.
GetCard
(
previousControler
,
(
CardLocation
)
previousLocation
,
previousSequence
);
if
(
card
!=
null
)
if
(
card
!=
null
)
card
.
Overlays
.
Remove
(
cardId
);
card
.
Overlays
.
Remove
(
cardId
);
previousLocation
=
0
;
// the card is removed when it go to overlay, so here we treat it as a new card
}
}
else
else
_duel
.
RemoveCard
((
CardLocation
)
previousLocation
,
card
,
previousControler
,
previousSequence
);
_duel
.
RemoveCard
((
CardLocation
)
previousLocation
,
card
,
previousControler
,
previousSequence
);
...
@@ -485,7 +486,7 @@ namespace WindBot.Game
...
@@ -485,7 +486,7 @@ namespace WindBot.Game
if
(
previousLocation
==
0
)
if
(
previousLocation
==
0
)
_duel
.
AddCard
((
CardLocation
)
currentLocation
,
cardId
,
currentControler
,
currentSequence
,
currentPosition
);
_duel
.
AddCard
((
CardLocation
)
currentLocation
,
cardId
,
currentControler
,
currentSequence
,
currentPosition
);
else
else
_duel
.
AddCard
((
CardLocation
)
currentLocation
,
card
,
currentControler
,
currentSequence
,
currentPosition
);
_duel
.
AddCard
((
CardLocation
)
currentLocation
,
card
,
currentControler
,
currentSequence
,
currentPosition
,
cardId
);
}
}
}
}
...
...
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