Commit 629a5178 authored by nanahira's avatar nanahira

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

parents 70e5d5f7 aa31628f
#created by ... #created by ...
#main #main
77558536
18144506
57774843 57774843
57774843 57774843
57774843 57774843
...@@ -9,7 +11,6 @@ ...@@ -9,7 +11,6 @@
59019082 59019082
77558536 77558536
77558536 77558536
77558536
22624373 22624373
22624373 22624373
67696066 67696066
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
691925 691925
691925 691925
5133471 5133471
18144506
32807846 32807846
73594093 73594093
94886282 94886282
......
...@@ -120,12 +120,18 @@ namespace WindBot.Game.AI.Decks ...@@ -120,12 +120,18 @@ namespace WindBot.Game.AI.Decks
private bool ReinforcementOfTheArmyEffect() private bool ReinforcementOfTheArmyEffect()
{ {
if (!Bot.HasInHand(CardId.Goblindbergh)) if (!Bot.HasInHand(CardId.Raiden))
AI.SelectCard(CardId.Goblindbergh); {
else if (!Bot.HasInHand(CardId.Raiden))
AI.SelectCard(CardId.Raiden); AI.SelectCard(CardId.Raiden);
return true; return true;
} }
else if (!Bot.HasInHand(CardId.Goblindbergh))
{
AI.SelectCard(CardId.Goblindbergh);
return true;
}
return false;
}
private bool ChargeOfTheLightBrigadeEffect() private bool ChargeOfTheLightBrigadeEffect()
{ {
...@@ -157,9 +163,9 @@ namespace WindBot.Game.AI.Decks ...@@ -157,9 +163,9 @@ namespace WindBot.Game.AI.Decks
private bool GoblindberghSummon() private bool GoblindberghSummon()
{ {
foreach (ClientCard card in Bot.Hand) foreach (ClientCard card in Bot.Hand.GetMonsters())
{ {
if (card != Card && card.IsMonster() && card.Level == 4) if (!card.Equals(Card) && card.Level == 4)
return true; return true;
} }
return false; return false;
...@@ -178,6 +184,32 @@ namespace WindBot.Game.AI.Decks ...@@ -178,6 +184,32 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
private bool LuminaEffect()
{
if (!Bot.HasInGraveyard(CardId.Raiden) && Bot.HasInHand(CardId.Raiden))
{
AI.SelectCard(CardId.Raiden);
}
else if (!ClownUsed && Bot.HasInHand(CardId.PerformageTrickClown))
{
AI.SelectCard(CardId.PerformageTrickClown);
}
else
{
AI.SelectCard(new[] {
CardId.Wulf,
CardId.Felis,
CardId.Minerva,
CardId.ThousandBlades
});
}
AI.SelectNextCard(new[] {
CardId.Raiden,
CardId.Felis
});
return true;
}
private bool PerformageTrickClownEffect() private bool PerformageTrickClownEffect()
{ {
ClownUsed = true; ClownUsed = true;
...@@ -185,9 +217,48 @@ namespace WindBot.Game.AI.Decks ...@@ -185,9 +217,48 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
private bool MinervaTheExaltedEffect()
{
if (Card.Location == CardLocation.MonsterZone)
{
return true;
}
else
{
IList<ClientCard> targets = new List<ClientCard>();
ClientCard target1 = AI.Utils.GetBestEnemyMonster();
if (target1 != null)
targets.Add(target1);
ClientCard target2 = AI.Utils.GetBestEnemySpell();
if (target2 != null)
targets.Add(target2);
foreach (ClientCard target in Enemy.GetMonsters())
{
if (targets.Count >= 3)
break;
if (!targets.Contains(target))
targets.Add(target);
}
foreach (ClientCard target in Enemy.GetSpells())
{
if (targets.Count >= 3)
break;
if (!targets.Contains(target))
targets.Add(target);
}
if (targets.Count == 0)
return false;
AI.SelectNextCard(targets);
return true;
}
}
private bool HonestEffect() private bool HonestEffect()
{ {
return Duel.Phase != DuelPhase.Main1; return Duel.Phase != DuelPhase.Main1;
} }
} }
} }
\ No newline at end of file
...@@ -71,7 +71,7 @@ WindBot can run as a "server", provide a http interface to create bot. ...@@ -71,7 +71,7 @@ WindBot can run as a "server", provide a http interface to create bot.
* ST1732 * ST1732
* Toadally Awesome (old lflist) * Toadally Awesome (old lflist, master rule 3 only)
* Yosenju * Yosenju
...@@ -99,7 +99,7 @@ WindBot can run as a "server", provide a http interface to create bot. ...@@ -99,7 +99,7 @@ WindBot can run as a "server", provide a http interface to create bot.
WindBot can run as a "server", provide a http interface to create bot. WindBot can run as a "server", provide a http interface to create bot.
eg. `http://127.0.0.1:2399/?name=%E2%91%A8&deck=Blue-Eyes&host=127.0.0.1&port=7911&dialog=cirno.zh-CN&version=4928` eg. `http://127.0.0.1:2399/?name=%E2%91%A8&deck=Blue-Eyes&host=127.0.0.1&port=7911&dialog=cirno.zh-CN`
In this situation, it will be multi-threaded. This can be useful for servers, since it don't use large amount memory. In this situation, it will be multi-threaded. This can be useful for servers, since it don't use large amount memory.
...@@ -113,6 +113,17 @@ The parameters are same as commandlines, but low cased. ...@@ -113,6 +113,17 @@ The parameters are same as commandlines, but low cased.
### Changelog ### Changelog
#### v0x1341 (2017-11-27)
- Update YGOPro protrol to 0x1341
- Change the program to x86 only
- Add BotWrapper for YGOPro bot mode
- Add `AI.SelectMaterials`, `OnSelectFusionMaterial`, `OnSelectPendulumSummon`, `AI.Utils.SelectPreferredCards` etc.
- Fix `AI.Utils.GetBestEnemySpell` to not return normal spell currently activating
- Fix AI don't attack defense Crystal Wing or S39
- Fix ZexalWeapons AI don't change defense S39 back
- Minor updates
#### v0x1340 (2017-11-06) #### v0x1340 (2017-11-06)
- Update YGOPro protrol to 0x1340 - Update YGOPro protrol to 0x1340
...@@ -153,12 +164,8 @@ The parameters are same as commandlines, but low cased. ...@@ -153,12 +164,8 @@ The parameters are same as commandlines, but low cased.
* `AI.SelectZone` * `AI.SelectZone`
* `AI.SelectMaterials` which select a set of cards for F/S/X/L summon
* `AI.SelectTribute` * `AI.SelectTribute`
* Select cards to pendulum summon in executor.
* Get equip of card. * Get equip of card.
* Get attack target. * Get attack target.
......
...@@ -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 = 0x1340; Version = 0x1341;
Hand = 0; 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