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
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
windbot
Commits
f79e942c
Commit
f79e942c
authored
Mar 17, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update SummonOrSet and DefaultMonsterSummon
LuckyExecutor no longer summon monster with higher attack tributes
parent
4e483428
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
14 deletions
+28
-14
Game/AI/Decks/DoEveryThingExecutor.cs
Game/AI/Decks/DoEveryThingExecutor.cs
+1
-1
Game/AI/Decks/HorusExecutor.cs
Game/AI/Decks/HorusExecutor.cs
+2
-2
Game/AI/Decks/LuckyExecutor.cs
Game/AI/Decks/LuckyExecutor.cs
+1
-2
Game/AI/Decks/OldSchoolExecutor.cs
Game/AI/Decks/OldSchoolExecutor.cs
+2
-2
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+10
-4
Game/AI/Executor.cs
Game/AI/Executor.cs
+10
-0
Game/GameAI.cs
Game/GameAI.cs
+2
-3
No files found.
Game/AI/Decks/DoEveryThingExecutor.cs
View file @
f79e942c
...
@@ -20,7 +20,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -20,7 +20,7 @@ namespace WindBot.Game.AI.Decks
{
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
AddExecutor
(
ExecutorType
.
SummonOrSet
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
);
}
}
...
...
Game/AI/Decks/HorusExecutor.cs
View file @
f79e942c
...
@@ -56,7 +56,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -56,7 +56,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MonsterReborn
,
MonsterReborn
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MonsterReborn
,
MonsterReborn
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteNightDragon
,
WhiteNightDragon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
WhiteNightDragon
,
WhiteNightDragon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
HorusTheBlackFlameDragonLv6
,
Default
Tribute
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
HorusTheBlackFlameDragonLv6
,
Default
Monster
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AlexandriteDragon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AlexandriteDragon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
AxeDragonute
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
AxeDragonute
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
DodgerDragon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
DodgerDragon
);
...
@@ -157,7 +157,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -157,7 +157,7 @@ namespace WindBot.Game.AI.Decks
if
(
card
.
IsCode
(
11224103
))
if
(
card
.
IsCode
(
11224103
))
return
false
;
return
false
;
return
Default
Tribute
Summon
();
return
Default
Monster
Summon
();
}
}
private
bool
HorusTheBlackFlameDragonLv8
()
private
bool
HorusTheBlackFlameDragonLv8
()
...
...
Game/AI/Decks/LuckyExecutor.cs
View file @
f79e942c
...
@@ -14,12 +14,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -14,12 +14,11 @@ namespace WindBot.Game.AI.Decks
{
{
AddExecutor
(
ExecutorType
.
Activate
,
ImFeelingLucky
);
AddExecutor
(
ExecutorType
.
Activate
,
ImFeelingLucky
);
AddExecutor
(
ExecutorType
.
SpSummon
,
ImFeelingLucky
);
AddExecutor
(
ExecutorType
.
SpSummon
,
ImFeelingLucky
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
ImFeelingLucky
);
AddExecutor
(
ExecutorType
.
SpSummon
,
ImFeelingUnlucky
);
AddExecutor
(
ExecutorType
.
SpSummon
,
ImFeelingUnlucky
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
ImFeelingUnlucky
);
AddExecutor
(
ExecutorType
.
Activate
,
ImFeelingUnlucky
);
AddExecutor
(
ExecutorType
.
Activate
,
ImFeelingUnlucky
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
DefaultSpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
DefaultSpellSet
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
...
...
Game/AI/Decks/OldSchoolExecutor.cs
View file @
f79e942c
...
@@ -46,8 +46,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -46,8 +46,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SwordsOfRevealingLight
,
SwordsOfRevealingLight
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SwordsOfRevealingLight
,
SwordsOfRevealingLight
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DoubleSummon
,
DoubleSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DoubleSummon
,
DoubleSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AncientGearGolem
,
Default
Tribute
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AncientGearGolem
,
Default
Monster
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Frostosaurus
,
Default
Tribute
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Frostosaurus
,
Default
Monster
Summon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
AlexandriteDragon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
AlexandriteDragon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
GeneWarpedWarwolf
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
GeneWarpedWarwolf
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
GearGolemTheMovingFortress
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
GearGolemTheMovingFortress
);
...
...
Game/AI/DefaultExecutor.cs
View file @
f79e942c
...
@@ -259,9 +259,12 @@ namespace WindBot.Game.AI
...
@@ -259,9 +259,12 @@ namespace WindBot.Game.AI
return
false
;
return
false
;
}
}
public
override
void
OnNewTurn
()
/// <summary>
/// Set when this card can't beat the enemies
/// </summary>
public
override
bool
OnSelectMonsterSummonOrSet
(
ClientCard
card
)
{
{
return
card
.
Level
<=
4
&&
Util
.
IsAllEnemyBetter
(
true
)
&&
Util
.
IsAllEnemyBetterThanValue
(
card
.
Attack
+
300
,
false
);
}
}
/// <summary>
/// <summary>
...
@@ -643,10 +646,13 @@ namespace WindBot.Game.AI
...
@@ -643,10 +646,13 @@ namespace WindBot.Game.AI
}
}
/// <summary>
/// <summary>
/// Summon with tributes ATK lower.
/// Summon with
no tribute, or with
tributes ATK lower.
/// </summary>
/// </summary>
protected
bool
Default
Tribute
Summon
()
protected
bool
Default
Monster
Summon
()
{
{
if
(
Card
.
Level
<=
4
)
return
true
;
if
(!
UniqueFaceupMonster
())
if
(!
UniqueFaceupMonster
())
return
false
;
return
false
;
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
...
...
Game/AI/Executor.cs
View file @
f79e942c
...
@@ -188,6 +188,16 @@ namespace WindBot.Game.AI
...
@@ -188,6 +188,16 @@ namespace WindBot.Game.AI
return
false
;
return
false
;
}
}
/// <summary>
/// Called when the executor type is SummonOrSet
/// </summary>
/// <returns>True if select to set the monster.</returns>
public
virtual
bool
OnSelectMonsterSummonOrSet
(
ClientCard
card
)
{
// Overrided in DefalultExecutor
return
false
;
}
/// <summary>
/// <summary>
/// Called when bot is going to annouce a card
/// Called when bot is going to annouce a card
/// </summary>
/// </summary>
...
...
Game/GameAI.cs
View file @
f79e942c
...
@@ -444,8 +444,7 @@ namespace WindBot.Game
...
@@ -444,8 +444,7 @@ namespace WindBot.Game
}
}
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
SummonOrSet
))
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
SummonOrSet
))
{
{
if
(
Executor
.
Util
.
IsAllEnemyBetter
(
true
)
&&
Executor
.
Util
.
IsAllEnemyBetterThanValue
(
card
.
Attack
+
300
,
false
)
&&
if
(
main
.
MonsterSetableCards
.
Contains
(
card
)
&&
Executor
.
OnSelectMonsterSummonOrSet
(
card
))
main
.
MonsterSetableCards
.
Contains
(
card
))
{
{
_dialogs
.
SendSetMonster
();
_dialogs
.
SendSetMonster
();
return
new
MainPhaseAction
(
MainPhaseAction
.
MainAction
.
SetMonster
,
card
.
ActionIndex
);
return
new
MainPhaseAction
(
MainPhaseAction
.
MainAction
.
SetMonster
,
card
.
ActionIndex
);
...
...
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