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
HiiragiGuardians
windbot
Commits
4f39fa7f
Commit
4f39fa7f
authored
Apr 12, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
b2bf309b
3f231833
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
21 deletions
+77
-21
BotWrapper/bot.conf
BotWrapper/bot.conf
+15
-0
Game/AI/Decks/ChainBurnExecutor.cs
Game/AI/Decks/ChainBurnExecutor.cs
+34
-16
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
+6
-0
Game/GameAI.cs
Game/GameAI.cs
+1
-0
README.md
README.md
+20
-4
WindBotInfo.cs
WindBotInfo.cs
+1
-1
No files found.
BotWrapper/bot.conf
View file @
4f39fa7f
...
@@ -49,6 +49,11 @@ Name=尼亚 Deck=Qliphort Dialog=near.zh-CN
...
@@ -49,6 +49,11 @@ Name=尼亚 Deck=Qliphort Dialog=near.zh-CN
机壳卡组。
机壳卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
!尼亚-淘气仙星
Name
=尼亚
Deck
=
Trickstar
Dialog
=
near
.
zh
-
CN
淘气仙星卡组。
SUPPORT_NEW_MASTER_RULE
!永远之魂-削血
!永远之魂-削血
Name
=永远之魂
Deck
=
Burn
Dialog
=
soul
.
zh
-
CN
Name
=永远之魂
Deck
=
Burn
Dialog
=
soul
.
zh
-
CN
老式削血卡组。
老式削血卡组。
...
@@ -78,3 +83,13 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
...
@@ -78,3 +83,13 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
Name
=试作型机器人
1732
Deck
=
ST1732
Dialog
=
zh
-
CN
Name
=试作型机器人
1732
Deck
=
ST1732
Dialog
=
zh
-
CN
由三盒
ST17
和三盒
SD32
组成的卡组。
由三盒
ST17
和三盒
SD32
组成的卡组。
SUPPORT_NEW_MASTER_RULE
SUPPORT_NEW_MASTER_RULE
!奇異果
Name
=奇異果
Deck
=
LightswornShaddoldinosour
Dialog
=
kiwi
.
zh
-
TW
光道影依恐龙卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
!燃血鬥士
Name
=燃血鬥士
Deck
=
ChainBurn
Dialog
=
kiwi
.
zh
-
TW
连锁烧卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
Game/AI/Decks/ChainBurnExecutor.cs
View file @
4f39fa7f
...
@@ -232,6 +232,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -232,6 +232,7 @@ namespace WindBot.Game.AI.Decks
bool
OjamaTrioused
=
false
;
bool
OjamaTrioused
=
false
;
bool
OjamaTrioused_draw
=
false
;
bool
OjamaTrioused_draw
=
false
;
bool
drawfirst
=
false
;
bool
drawfirst
=
false
;
bool
Linkuribohused
=
true
;
int
Waboku_count
=
0
;
int
Waboku_count
=
0
;
int
Roar_count
=
0
;
int
Roar_count
=
0
;
int
strike_count
=
0
;
int
strike_count
=
0
;
...
@@ -251,8 +252,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -251,8 +252,8 @@ namespace WindBot.Game.AI.Decks
no_sp
=
false
;
no_sp
=
false
;
prevent_used
=
false
;
prevent_used
=
false
;
Linkuribohused
=
true
;
}
}
public
override
void
OnNewPhase
()
public
override
void
OnNewPhase
()
...
@@ -260,8 +261,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -260,8 +261,9 @@ namespace WindBot.Game.AI.Decks
preventcount
=
0
;
preventcount
=
0
;
battleprevent
=
false
;
battleprevent
=
false
;
OjamaTrioused
=
false
;
OjamaTrioused
=
false
;
IList
<
ClientCard
>
trap
=
Bot
.
SpellZone
;
IList
<
ClientCard
>
monster
=
Bot
.
MonsterZone
;
IList
<
ClientCard
>
trap
=
Bot
.
GetSpells
();
IList
<
ClientCard
>
monster
=
Bot
.
GetMonsters
();
foreach
(
ClientCard
card
in
trap
)
foreach
(
ClientCard
card
in
trap
)
{
{
...
@@ -297,7 +299,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -297,7 +299,7 @@ namespace WindBot.Game.AI.Decks
Roar_count
=
0
;
Roar_count
=
0
;
Ojama_count
=
0
;
Ojama_count
=
0
;
IList
<
ClientCard
>
check
=
Bot
.
SpellZone
;
IList
<
ClientCard
>
check
=
Bot
.
GetSpells
()
;
foreach
(
ClientCard
card
in
check
)
foreach
(
ClientCard
card
in
check
)
{
{
if
(
card
.
Id
==
CardId
.
AccuulatedFortune
)
if
(
card
.
Id
==
CardId
.
AccuulatedFortune
)
...
@@ -352,7 +354,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -352,7 +354,7 @@ namespace WindBot.Game.AI.Decks
}
}
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
);
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
);
if
(
Enemy
.
LifePoints
<=
expected_blood
)
one_turn_kill
=
true
;
//if (Enemy.LifePoints <= expected_blood && Duel.Player == 1
) one_turn_kill = true;
if
(
greed_count
>=
2
)
greed_count
=
1
;
if
(
greed_count
>=
2
)
greed_count
=
1
;
if
(
blast_count
>=
2
)
blast_count
=
1
;
if
(
blast_count
>=
2
)
blast_count
=
1
;
if
(
just_count
>=
2
)
just_count
=
1
;
if
(
just_count
>=
2
)
just_count
=
1
;
...
@@ -365,10 +367,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -365,10 +367,10 @@ namespace WindBot.Game.AI.Decks
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
Roar_count
+
greed_count
+
strike_count
+
Ojama_count
;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
Roar_count
+
greed_count
+
strike_count
+
Ojama_count
;
else
else
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
greed_count
+
Roar_count
+
strike_count
;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
+
Waboku_count
+
Waboku_count
+
greed_count
+
Roar_count
+
strike_count
;
if
(
currentchain
>=
3
)
drawfirst
=
true
;
//if (currentchain >= 3 && Duel.Player == 1
) drawfirst = true;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
;
currentchain
=
Duel
.
CurrentChain
.
Count
+
blast_count
+
just_count
+
barrel_count
;
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+(
currentchain
+
1
)*
400
);
expected_blood
=
(
Enemy
.
GetMonsterCount
()
*
500
*
just_count
+
Enemy
.
GetFieldHandCount
()
*
200
*
barrel_count
+
Enemy
.
GetFieldCount
()
*
300
*
blast_count
+(
currentchain
+
1
)*
400
);
if
(
Enemy
.
LifePoints
<=
expected_blood
)
one_turn_kill_1
=
true
;
//if (Enemy.LifePoints <= expected_blood && Duel.Player==1
) one_turn_kill_1 = true;
}
}
...
@@ -439,7 +441,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -439,7 +441,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ThreateningRoareff
()
private
bool
ThreateningRoareff
()
{
{
if
(
drawfirst
)
return
true
;
if
(
drawfirst
)
return
true
;
if
(
must_chain
())
return
true
;
if
(
must_chain
())
return
DefaultUniqueTrap
()
;
if
(
prevent_used
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
if
(
prevent_used
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
prevent_used
=
true
;
prevent_used
=
true
;
return
DefaultUniqueTrap
();
return
DefaultUniqueTrap
();
...
@@ -452,11 +454,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -452,11 +454,19 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
Wabokueff
()
private
bool
Wabokueff
()
{
{
if
(
drawfirst
)
return
true
;
if
(
drawfirst
)
if
(
must_chain
())
return
true
;
{
if
(
drawfirst
)
return
true
;
Linkuribohused
=
false
;
return
true
;
}
if
(
must_chain
())
{
Linkuribohused
=
false
;
return
DefaultUniqueTrap
();
}
if
(
prevent_used
||
Duel
.
Player
==
0
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
if
(
prevent_used
||
Duel
.
Player
==
0
||
Duel
.
Phase
!=
DuelPhase
.
BattleStart
)
return
false
;
prevent_used
=
true
;
prevent_used
=
true
;
Linkuribohused
=
false
;
return
DefaultUniqueTrap
();
return
DefaultUniqueTrap
();
}
}
private
bool
BattleFadereff
()
private
bool
BattleFadereff
()
...
@@ -610,10 +620,18 @@ namespace WindBot.Game.AI.Decks
...
@@ -610,10 +620,18 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
Linkuriboheff
()
private
bool
Linkuriboheff
()
{
{
ClientCard
lastchaincard
=
AI
.
Utils
.
GetLastChainCard
();
if
(
lastchaincard
==
null
)
return
true
;
IList
<
ClientCard
>
newlist
=
new
List
<
ClientCard
>();
if
(
lastchaincard
.
Id
==
CardId
.
Linkuriboh
)
return
false
;
foreach
(
ClientCard
newmonster
in
Enemy
.
GetMonsters
())
{
newlist
.
Add
(
newmonster
);
}
if
(!
Linkuribohused
)
return
false
;
if
(
Enemy
.
BattlingMonster
.
Attack
>
1800
&&
Bot
.
HasInSpellZone
(
CardId
.
MagicCylinder
))
return
false
;
if
(
GetTotalATK
(
newlist
)
>=
3000
&&
Bot
.
HasInSpellZone
(
CardId
.
BlazingMirrorForce
))
return
false
;
if
(
AI
.
Utils
.
GetLastChainCard
()
==
null
)
return
true
;
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
CardId
.
Linkuriboh
)
return
false
;
return
true
;
return
true
;
}
}
...
...
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
View file @
4f39fa7f
...
@@ -600,6 +600,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -600,6 +600,12 @@ namespace WindBot.Game.AI.Decks
private
bool
ShaddollFusioneff
()
private
bool
ShaddollFusioneff
()
{
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
ElShaddollConstruct
)
||
Bot
.
HasInMonstersZone
(
CardId
.
ElShaddollGrysra
)
||
Bot
.
HasInMonstersZone
(
CardId
.
ElShaddollShekhinaga
)
||
Bot
.
HasInMonstersZone
(
CardId
.
ElShaddollWinda
))
return
false
;
bool
deck_check
=
false
;
bool
deck_check
=
false
;
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
foreach
(
ClientCard
monster
in
monsters
)
...
...
Game/GameAI.cs
View file @
4f39fa7f
...
@@ -94,6 +94,7 @@ namespace WindBot.Game
...
@@ -94,6 +94,7 @@ namespace WindBot.Game
{
{
_dialogs
.
SendNewTurn
();
_dialogs
.
SendNewTurn
();
}
}
Executor
.
OnNewPhase
();
}
}
/// <summary>
/// <summary>
...
...
README.md
View file @
4f39fa7f
...
@@ -73,6 +73,8 @@ WindBot can run as a "server", provide a http interface to create bot.
...
@@ -73,6 +73,8 @@ WindBot can run as a "server", provide a http interface to create bot.
*
Toadally Awesome (old lflist, master rule 3 only)
*
Toadally Awesome (old lflist, master rule 3 only)
*
Trickstar
*
Yosenju
*
Yosenju
*
Zexal Weapons
*
Zexal Weapons
...
@@ -83,6 +85,8 @@ WindBot can run as a "server", provide a http interface to create bot.
...
@@ -83,6 +85,8 @@ WindBot can run as a "server", provide a http interface to create bot.
*
Blackwing
*
Blackwing
*
ChainBurn
*
CyberDragon
*
CyberDragon
*
Evilswarm
*
Evilswarm
...
@@ -93,6 +97,8 @@ WindBot can run as a "server", provide a http interface to create bot.
...
@@ -93,6 +97,8 @@ WindBot can run as a "server", provide a http interface to create bot.
*
Lightsworn
*
Lightsworn
*
LightswornShaddoldinosour
*
Nekroz
*
Nekroz
### Server mode
### Server mode
...
@@ -107,12 +113,24 @@ The parameters are same as commandlines, but low cased.
...
@@ -107,12 +113,24 @@ The parameters are same as commandlines, but low cased.
### Known issues
### Known issues
*
The attack won't be canceled when battle replay happens.
*
If one chain includes two activation that use
`AI.SelectCard`
, the second one won't select correctly.
*
If one chain includes two activation that use
`AI.SelectCard`
, the second one won't select correctly.
### Changelog
### Changelog
#### v0x1343 (2018-04-11)
-
Update YGOPro protrol to 0x1343
-
New decks: Trickstar, LightswornShaddoldinosour, ChainBurn
-
Update
`OnBattle`
, add
`Executor.OnSelectAttacker`
and
`Executor.OnSelectAttackTarget`
-
Add
`Executor.OnSelectPosition`
,
`Executor.OnSelectBattleReplay`
-
Add
`Bot.BattlingMonster`
-
Add and update some default executors
-
Change
`Duel.LifePoints[0]`
to
`Bot.LifePoints`
-
Change
`LastChainPlayer`
and
`CurrentChain`
to
`Duel`
class
-
Change
`ChainContainsCard`
and
`GetLastChainCard`
etc. to
`AI.Utils`
class
-
Fix turn count in match duel
-
Fix don't turn 0 atk monster to atk pos
#### v0x1342 (2017-12-26)
#### v0x1342 (2017-12-26)
-
Update YGOPro protrol to 0x1342
-
Update YGOPro protrol to 0x1342
...
@@ -173,8 +191,6 @@ The parameters are same as commandlines, but low cased.
...
@@ -173,8 +191,6 @@ The parameters are same as commandlines, but low cased.
*
Get equip of card.
*
Get equip of card.
*
Get attack target.
*
Better new master rule support
*
Better new master rule support
*
Update the known card enums
*
Update the known card enums
...
...
WindBotInfo.cs
View file @
4f39fa7f
...
@@ -21,7 +21,7 @@ namespace WindBot
...
@@ -21,7 +21,7 @@ namespace WindBot
Host
=
"127.0.0.1"
;
Host
=
"127.0.0.1"
;
Port
=
7911
;
Port
=
7911
;
HostInfo
=
""
;
HostInfo
=
""
;
Version
=
0x134
2
;
Version
=
0x134
3
;
Hand
=
0
;
Hand
=
0
;
}
}
}
}
...
...
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