Commit 4bd3a76f authored by mercury233's avatar mercury233

change CardId enum to class

parent 1129131c
This diff is collapsed.
...@@ -9,28 +9,28 @@ namespace WindBot.Game.AI ...@@ -9,28 +9,28 @@ namespace WindBot.Game.AI
{ {
public abstract class DefaultExecutor : Executor public abstract class DefaultExecutor : Executor
{ {
private enum CardId protected class _CardId
{ {
JizukirutheStarDestroyingKaiju = 63941210, public static int JizukirutheStarDestroyingKaiju = 63941210;
GadarlatheMysteryDustKaiju = 36956512, public static int GadarlatheMysteryDustKaiju = 36956512;
GamecieltheSeaTurtleKaiju = 55063751, public static int GamecieltheSeaTurtleKaiju = 55063751;
RadiantheMultidimensionalKaiju = 28674152, public static int RadiantheMultidimensionalKaiju = 28674152;
KumongoustheStickyStringKaiju = 29726552, public static int KumongoustheStickyStringKaiju = 29726552;
ThunderKingtheLightningstrikeKaiju = 48770333, public static int ThunderKingtheLightningstrikeKaiju = 48770333;
DogorantheMadFlameKaiju = 93332803, public static int DogorantheMadFlameKaiju = 93332803;
SuperAntiKaijuWarMachineMechaDogoran = 84769941, public static int SuperAntiKaijuWarMachineMechaDogoran = 84769941;
MysticalSpaceTyphoon = 5318639, public static int MysticalSpaceTyphoon = 5318639;
CosmicCyclone = 8267140, public static int CosmicCyclone = 8267140;
ChickenGame = 67616300, public static int ChickenGame = 67616300;
CastelTheSkyblasterMusketeer = 82633039 public static int CastelTheSkyblasterMusketeer = 82633039;
} }
protected DefaultExecutor(GameAI ai, Duel duel) protected DefaultExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.Activate, (int)CardId.ChickenGame, DefaultChickenGame); AddExecutor(ExecutorType.Activate, _CardId.ChickenGame, DefaultChickenGame);
} }
/// <summary> /// <summary>
...@@ -39,7 +39,7 @@ namespace WindBot.Game.AI ...@@ -39,7 +39,7 @@ namespace WindBot.Game.AI
protected bool DefaultMysticalSpaceTyphoon() protected bool DefaultMysticalSpaceTyphoon()
{ {
foreach (ClientCard card in CurrentChain) foreach (ClientCard card in CurrentChain)
if (card.Id == (int)CardId.MysticalSpaceTyphoon) if (card.Id == _CardId.MysticalSpaceTyphoon)
return false; return false;
List<ClientCard> spells = Enemy.GetSpells(); List<ClientCard> spells = Enemy.GetSpells();
...@@ -72,7 +72,7 @@ namespace WindBot.Game.AI ...@@ -72,7 +72,7 @@ namespace WindBot.Game.AI
protected bool DefaultCosmicCyclone() protected bool DefaultCosmicCyclone()
{ {
foreach (ClientCard card in CurrentChain) foreach (ClientCard card in CurrentChain)
if (card.Id == (int)CardId.CosmicCyclone) if (card.Id == _CardId.CosmicCyclone)
return false; return false;
return (Duel.LifePoints[0] > 1000) && DefaultMysticalSpaceTyphoon(); return (Duel.LifePoints[0] > 1000) && DefaultMysticalSpaceTyphoon();
} }
...@@ -390,9 +390,9 @@ namespace WindBot.Game.AI ...@@ -390,9 +390,9 @@ namespace WindBot.Game.AI
} }
if (count > 1 || Duel.LifePoints[0] <= 1000) if (count > 1 || Duel.LifePoints[0] <= 1000)
return false; return false;
if (Duel.LifePoints[0] <= Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId((int)CardId.ChickenGame, 0)) if (Duel.LifePoints[0] <= Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId(_CardId.ChickenGame, 0))
return true; return true;
if (Duel.LifePoints[0] > Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId((int)CardId.ChickenGame, 1)) if (Duel.LifePoints[0] > Duel.LifePoints[1] && ActivateDescription == AI.Utils.GetStringId(_CardId.ChickenGame, 1))
return true; return true;
return false; return false;
} }
...@@ -493,26 +493,26 @@ namespace WindBot.Game.AI ...@@ -493,26 +493,26 @@ namespace WindBot.Game.AI
{ {
AI.SelectCard(new[] AI.SelectCard(new[]
{ {
(int)CardId.GamecieltheSeaTurtleKaiju, _CardId.GamecieltheSeaTurtleKaiju,
(int)CardId.KumongoustheStickyStringKaiju, _CardId.KumongoustheStickyStringKaiju,
(int)CardId.RadiantheMultidimensionalKaiju, _CardId.RadiantheMultidimensionalKaiju,
(int)CardId.GadarlatheMysteryDustKaiju _CardId.GadarlatheMysteryDustKaiju
}); });
return true; return true;
} }
AI.SelectCard(new[] AI.SelectCard(new[]
{ {
(int)CardId.JizukirutheStarDestroyingKaiju, _CardId.JizukirutheStarDestroyingKaiju,
(int)CardId.RadiantheMultidimensionalKaiju, _CardId.RadiantheMultidimensionalKaiju,
(int)CardId.GadarlatheMysteryDustKaiju, _CardId.GadarlatheMysteryDustKaiju,
(int)CardId.KumongoustheStickyStringKaiju _CardId.KumongoustheStickyStringKaiju
}); });
AI.SelectNextCard(new[] AI.SelectNextCard(new[]
{ {
(int)CardId.GamecieltheSeaTurtleKaiju, _CardId.GamecieltheSeaTurtleKaiju,
(int)CardId.KumongoustheStickyStringKaiju, _CardId.KumongoustheStickyStringKaiju,
(int)CardId.GadarlatheMysteryDustKaiju, _CardId.GadarlatheMysteryDustKaiju,
(int)CardId.RadiantheMultidimensionalKaiju _CardId.RadiantheMultidimensionalKaiju
}); });
return DefaultDarkHole(); return DefaultDarkHole();
} }
...@@ -523,14 +523,14 @@ namespace WindBot.Game.AI ...@@ -523,14 +523,14 @@ namespace WindBot.Game.AI
protected bool DefaultKaijuSpsummon() protected bool DefaultKaijuSpsummon()
{ {
IList<int> kaijus = new[] { IList<int> kaijus = new[] {
(int)CardId.JizukirutheStarDestroyingKaiju, _CardId.JizukirutheStarDestroyingKaiju,
(int)CardId.GadarlatheMysteryDustKaiju, _CardId.GadarlatheMysteryDustKaiju,
(int)CardId.GamecieltheSeaTurtleKaiju, _CardId.GamecieltheSeaTurtleKaiju,
(int)CardId.RadiantheMultidimensionalKaiju, _CardId.RadiantheMultidimensionalKaiju,
(int)CardId.KumongoustheStickyStringKaiju, _CardId.KumongoustheStickyStringKaiju,
(int)CardId.ThunderKingtheLightningstrikeKaiju, _CardId.ThunderKingtheLightningstrikeKaiju,
(int)CardId.DogorantheMadFlameKaiju, _CardId.DogorantheMadFlameKaiju,
(int)CardId.SuperAntiKaijuWarMachineMechaDogoran _CardId.SuperAntiKaijuWarMachineMechaDogoran
}; };
foreach (ClientCard monster in Enemy.GetMonsters()) foreach (ClientCard monster in Enemy.GetMonsters())
{ {
...@@ -612,7 +612,7 @@ namespace WindBot.Game.AI ...@@ -612,7 +612,7 @@ namespace WindBot.Game.AI
protected bool DefaultCastelTheSkyblasterMusketeerEffect() protected bool DefaultCastelTheSkyblasterMusketeerEffect()
{ {
if (ActivateDescription == AI.Utils.GetStringId((int)CardId.CastelTheSkyblasterMusketeer, 0)) if (ActivateDescription == AI.Utils.GetStringId(_CardId.CastelTheSkyblasterMusketeer, 0))
return false; return false;
ClientCard target = AI.Utils.GetProblematicEnemyCard(); ClientCard target = AI.Utils.GetProblematicEnemyCard();
if (target != null) if (target != null)
......
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