Commit d0aa9b30 authored by mercury233's avatar mercury233

fix Zexal Weapon infinite activate

parent 6e96e522
...@@ -79,9 +79,9 @@ namespace WindBot.Game.AI.Decks ...@@ -79,9 +79,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.Number61Volcasaurus); AddExecutor(ExecutorType.Activate, CardId.Number61Volcasaurus);
// Weapons // Weapons
AddExecutor(ExecutorType.Activate, CardId.ZwTornadoBringer); AddExecutor(ExecutorType.Activate, CardId.ZwTornadoBringer, ZwWeapon);
AddExecutor(ExecutorType.Activate, CardId.ZwLightningBlade); AddExecutor(ExecutorType.Activate, CardId.ZwLightningBlade, ZwWeapon);
AddExecutor(ExecutorType.Activate, CardId.ZwAsuraStrike); AddExecutor(ExecutorType.Activate, CardId.ZwAsuraStrike, ZwWeapon);
// Special summons // Special summons
...@@ -122,6 +122,13 @@ namespace WindBot.Game.AI.Decks ...@@ -122,6 +122,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike); AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
} }
private int ZwCount = 0;
public override void OnNewTurn()
{
ZwCount = 0;
}
public override bool OnSelectHand() public override bool OnSelectHand()
{ {
return false; return false;
...@@ -164,10 +171,16 @@ namespace WindBot.Game.AI.Decks ...@@ -164,10 +171,16 @@ namespace WindBot.Game.AI.Decks
if (ActivateDescription == Util.GetStringId(CardId.ZwLionArms, 0)) if (ActivateDescription == Util.GetStringId(CardId.ZwLionArms, 0))
return true; return true;
if (ActivateDescription == Util.GetStringId(CardId.ZwLionArms, 1)) if (ActivateDescription == Util.GetStringId(CardId.ZwLionArms, 1))
return !Card.IsDisabled(); return !Card.IsDisabled() && ZwWeapon();
return false; return false;
} }
private bool ZwWeapon()
{
ZwCount++;
return ZwCount < 10;
}
private bool ReinforcementOfTheArmy() private bool ReinforcementOfTheArmy()
{ {
AI.SelectCard( AI.SelectCard(
......
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