Commit 4f39fa7f authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/IceYGO/windbot

parents b2bf309b 3f231833
......@@ -49,6 +49,11 @@ Name=尼亚 Deck=Qliphort Dialog=near.zh-CN
机壳卡组。
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
老式削血卡组。
......@@ -78,3 +83,13 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
Name=试作型机器人1732 Deck=ST1732 Dialog=zh-CN
由三盒ST17和三盒SD32组成的卡组。
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
......@@ -232,6 +232,7 @@ namespace WindBot.Game.AI.Decks
bool OjamaTrioused = false;
bool OjamaTrioused_draw = false;
bool drawfirst = false;
bool Linkuribohused = true;
int Waboku_count = 0;
int Roar_count = 0;
int strike_count = 0;
......@@ -252,7 +253,7 @@ namespace WindBot.Game.AI.Decks
no_sp = false;
prevent_used = false;
Linkuribohused = true;
}
public override void OnNewPhase()
......@@ -260,8 +261,9 @@ namespace WindBot.Game.AI.Decks
preventcount = 0;
battleprevent = 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)
{
......@@ -297,7 +299,7 @@ namespace WindBot.Game.AI.Decks
Roar_count = 0;
Ojama_count = 0;
IList<ClientCard> check = Bot.SpellZone;
IList<ClientCard> check = Bot.GetSpells();
foreach (ClientCard card in check)
{
if (card.Id == CardId.AccuulatedFortune)
......@@ -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);
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 (blast_count >= 2) blast_count = 1;
if (just_count >= 2) just_count = 1;
......@@ -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;
else
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;
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
private bool ThreateningRoareff()
{
if (drawfirst) return true;
if (must_chain()) return true;
if (must_chain()) return DefaultUniqueTrap();
if (prevent_used || Duel.Phase != DuelPhase.BattleStart) return false;
prevent_used = true;
return DefaultUniqueTrap();
......@@ -452,11 +454,19 @@ namespace WindBot.Game.AI.Decks
}
private bool Wabokueff()
{
if (drawfirst) return true;
if (must_chain()) return true;
if (drawfirst) return true;
if (drawfirst)
{
Linkuribohused = false;
return true;
}
if (must_chain())
{
Linkuribohused = false;
return DefaultUniqueTrap();
}
if (prevent_used||Duel.Player == 0||Duel.Phase!=DuelPhase.BattleStart) return false;
prevent_used = true;
Linkuribohused = false;
return DefaultUniqueTrap();
}
private bool BattleFadereff()
......@@ -611,9 +621,17 @@ namespace WindBot.Game.AI.Decks
}
private bool Linkuriboheff()
{
ClientCard lastchaincard = AI.Utils.GetLastChainCard();
if (lastchaincard == null) return true;
if (lastchaincard.Id == CardId.Linkuriboh) return false;
IList<ClientCard> newlist = new List<ClientCard>();
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;
}
......
......@@ -600,6 +600,12 @@ namespace WindBot.Game.AI.Decks
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;
List<ClientCard> monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
......
......@@ -94,6 +94,7 @@ namespace WindBot.Game
{
_dialogs.SendNewTurn();
}
Executor.OnNewPhase();
}
/// <summary>
......
......@@ -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)
* Trickstar
* Yosenju
* Zexal Weapons
......@@ -83,6 +85,8 @@ WindBot can run as a "server", provide a http interface to create bot.
* Blackwing
* ChainBurn
* CyberDragon
* Evilswarm
......@@ -93,6 +97,8 @@ WindBot can run as a "server", provide a http interface to create bot.
* Lightsworn
* LightswornShaddoldinosour
* Nekroz
### Server mode
......@@ -107,12 +113,24 @@ The parameters are same as commandlines, but low cased.
### 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.
### 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)
- Update YGOPro protrol to 0x1342
......@@ -173,8 +191,6 @@ The parameters are same as commandlines, but low cased.
* Get equip of card.
* Get attack target.
* Better new master rule support
* Update the known card enums
......
......@@ -21,7 +21,7 @@ namespace WindBot
Host = "127.0.0.1";
Port = 7911;
HostInfo = "";
Version = 0x1342;
Version = 0x1343;
Hand = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment