Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
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
alstroemeria-silentlove
windbot
Commits
ac2aefb4
Commit
ac2aefb4
authored
Sep 02, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DefaultChickenGame
parent
9371b29f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+23
-4
No files found.
Game/AI/DefaultExecutor.cs
View file @
ac2aefb4
...
...
@@ -6,14 +6,16 @@ namespace WindBot.Game.AI
{
public
abstract
class
DefaultExecutor
:
Executor
{
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
private
enum
CardId
{
MysticalSpaceTyphoon
=
5318639
,
ChickenGame
=
67616300
}
private
enum
CardId
protected
DefaultExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
MysticalSpaceTyphoon
=
5318639
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
ChickenGame
,
DefaultChickenGame
);
}
protected
bool
DefaultMysticalSpaceTyphoon
()
...
...
@@ -152,5 +154,22 @@ namespace WindBot.Game.AI
return
true
;
}
protected
bool
DefaultChickenGame
()
{
int
count
=
0
;
foreach
(
CardExecutor
exec
in
Executors
)
{
if
(
exec
.
Type
==
Type
&&
exec
.
CardId
==
Card
.
Id
)
count
++;
}
if
(
count
>
1
||
Duel
.
LifePoints
[
0
]
<=
1000
)
return
false
;
if
(
Duel
.
LifePoints
[
0
]
<=
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
ChickenGame
,
0
))
return
true
;
if
(
Duel
.
LifePoints
[
0
]
>
Duel
.
LifePoints
[
1
]
&&
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
ChickenGame
,
1
))
return
true
;
return
false
;
}
}
}
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