Commit aa31628f authored by mercury233's avatar mercury233
parents d0bf8485 bc692f39
......@@ -2,79 +2,79 @@
# !name
# command
# description
# flag ( 0x1=SUPPORT_MASTER_RULE_3 , 0x2=SUPPORT_NEW_MASTER_RULE )
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE)
!谜之剑士LV4-龙骑星爆
Name=谜之剑士LV4 Deck=Dragunity Dialog=swordsman.zh-CN
龙骑轴星尘龙爆裂体卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!谜之剑士LV4-R5
Name=谜之剑士LV4 Deck='Rank V' Dialog=swordsman.zh-CN
5阶超量卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!谜之剑士LV4-异热同心武器
Name=谜之剑士LV4 Deck='Zexal Weapons' Dialog=swordsman.zh-CN
神装电光皇卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!琪露诺-彩虹
Name=琪露诺 Deck=Rainbow Dialog=cirno.zh-CN
全属性凡骨卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!琪露诺-饼蛙
Name=琪露诺 Deck='Toadally Awesome' Dialog=cirno.zh-CN
大师规则三的全盛饼蛙卡组。
1
SUPPORT_MASTER_RULE_3
!复制植物-青眼
Name=复制植物 Deck=Blue-Eyes Dialog=copy.zh-CN
青眼卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!复制植物-十二兽
Name=复制植物 Deck=Zoodiac Dialog=copy.zh-CN
大师规则三的十四兽卡组。
1
SUPPORT_MASTER_RULE_3
!尼亚-妖仙兽
Name=尼亚 Deck=Yosenju Dialog=near.zh-CN
妖仙兽卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!尼亚-机壳
Name=尼亚 Deck=Qliphort Dialog=near.zh-CN
机壳卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!永远之魂-削血
Name=永远之魂 Deck=Burn Dialog=soul.zh-CN
老式削血卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!永远之魂-青蛙
Name=永远之魂 Deck=Frog Dialog=soul.zh-CN
老式青蛙卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!永远之魂-荷鲁斯
Name=永远之魂 Deck=Horus Dialog=soul.zh-CN
老式龙族卡组。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!悠悠
Name=悠悠 Deck=MokeyMokey Dialog=mokey.zh-CN
沙包。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!悠悠王
Name=悠悠王 Deck=MokeyMokeyKing Dialog=mokey.zh-CN
大沙包。
3
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!试作型机器人1732
Name=试作型机器人1732 Deck=ST1732 Dialog=zh-CN
由三盒ST17和三盒SD32组成的卡组。
2
SUPPORT_NEW_MASTER_RULE
#created by ...
#main
77558536
18144506
57774843
57774843
57774843
......@@ -9,7 +11,6 @@
59019082
77558536
77558536
77558536
22624373
22624373
67696066
......@@ -34,7 +35,6 @@
691925
691925
5133471
18144506
32807846
73594093
94886282
......
......@@ -120,11 +120,17 @@ namespace WindBot.Game.AI.Decks
private bool ReinforcementOfTheArmyEffect()
{
if (!Bot.HasInHand(CardId.Goblindbergh))
AI.SelectCard(CardId.Goblindbergh);
else if (!Bot.HasInHand(CardId.Raiden))
if (!Bot.HasInHand(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()
......@@ -157,9 +163,9 @@ namespace WindBot.Game.AI.Decks
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 false;
......@@ -178,6 +184,32 @@ namespace WindBot.Game.AI.Decks
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()
{
ClownUsed = true;
......@@ -185,9 +217,48 @@ namespace WindBot.Game.AI.Decks
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()
{
return Duel.Phase != DuelPhase.Main1;
}
}
}
\ No newline at end of file
......@@ -147,18 +147,7 @@ namespace WindBot.Game.AI
if (Card.Location == CardLocation.Grave)
{
selected = Enemy.SpellZone.GetFloodgate();
if (selected == null)
{
foreach (ClientCard card in spells)
{
if (!card.IsFacedown())
{
selected = card;
break;
}
}
}
selected = AI.Utils.GetBestEnemySpell(true);
}
else
{
......@@ -187,7 +176,7 @@ namespace WindBot.Game.AI
if (AI.Utils.IsAllEnemyBetter(true))
{
ClientCard monster = Enemy.GetMonsters().GetHighestAttackMonster();
if (monster != null && monster.HasType(CardType.Effect) && (monster.HasType(CardType.Xyz) || monster.Level > 4))
if (monster != null && monster.HasType(CardType.Effect) && !monster.HasType(CardType.Link) && (monster.HasType(CardType.Xyz) || monster.Level > 4))
{
AI.SelectCard(monster);
return true;
......
......@@ -281,16 +281,21 @@ namespace WindBot.Game
packet.ReadByte();
packet.ReadByte();
packet.ReadByte();
int code = packet.ReadInt32();
int pcode = packet.ReadInt32();
if (msg == 2) //ERRMSG_DECKERROR
{
NamedCard card = NamedCard.Get(code);
if (card != null)
_ai.OnDeckError(card.Name);
else if (code == 1)
_ai.OnDeckError("DECK");
int code = pcode & 0xFFFFFFF;
int flag = pcode >> 28;
if (flag <= 5) //DECKERROR_CARDCOUNT
{
NamedCard card = NamedCard.Get(code);
if (card != null)
_ai.OnDeckError(card.Name);
else
_ai.OnDeckError("Unknown Card");
}
else
_ai.OnDeckError("Unknown Card");
_ai.OnDeckError("DECK");
}
//Connection.Close();
}
......
......@@ -71,7 +71,7 @@ WindBot can run as a "server", provide a http interface to create bot.
* ST1732
* Toadally Awesome (old lflist)
* Toadally Awesome (old lflist, master rule 3 only)
* Yosenju
......@@ -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.
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.
......@@ -113,6 +113,17 @@ The parameters are same as commandlines, but low cased.
### 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)
- Update YGOPro protrol to 0x1340
......@@ -153,12 +164,8 @@ The parameters are same as commandlines, but low cased.
* `AI.SelectZone`
* `AI.SelectMaterials` which select a set of cards for F/S/X/L summon
* `AI.SelectTribute`
* Select cards to pendulum summon in executor.
* Get equip of card.
* Get attack target.
......
......@@ -21,7 +21,7 @@ namespace WindBot
Host = "127.0.0.1";
Port = 7911;
HostInfo = "";
Version = 0x1340;
Version = 0x1341;
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