Commit c0e38532 authored by mercury233's avatar mercury233

fix CardId name conflict

parent 37c22985
...@@ -12,7 +12,7 @@ namespace WindBot.Game.AI.Decks ...@@ -12,7 +12,7 @@ namespace WindBot.Game.AI.Decks
[Deck("MathMech", "AI_Mathmech")] [Deck("MathMech", "AI_Mathmech")]
public class MathmechExecutor : DefaultExecutor public class MathmechExecutor : DefaultExecutor
{ {
public class CardID public class CardId
{ {
public const int MathmechNebla = 53577438; public const int MathmechNebla = 53577438;
public const int MathmechSigma = 27182739; public const int MathmechSigma = 27182739;
...@@ -45,47 +45,47 @@ namespace WindBot.Game.AI.Decks ...@@ -45,47 +45,47 @@ namespace WindBot.Game.AI.Decks
public MathmechExecutor(GameAI ai, Duel duel) public MathmechExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.Activate, CardID.raigeki ,when_raigeki); AddExecutor(ExecutorType.Activate, CardId.raigeki ,when_raigeki);
AddExecutor(ExecutorType.Activate, CardID.upstartGoblin); AddExecutor(ExecutorType.Activate, CardId.upstartGoblin);
AddExecutor(ExecutorType.Activate, CardID.OneTimePasscode); AddExecutor(ExecutorType.Activate, CardId.OneTimePasscode);
AddExecutor(ExecutorType.SpellSet, CardID.threanteningRoar); AddExecutor(ExecutorType.SpellSet, CardId.threanteningRoar);
AddExecutor(ExecutorType.Activate,CardID.cosmicCyclone , when_cosmic); AddExecutor(ExecutorType.Activate,CardId.cosmicCyclone , when_cosmic);
AddExecutor(ExecutorType.Activate,CardID.lightningStorm ,lightstorm_target); AddExecutor(ExecutorType.Activate,CardId.lightningStorm ,lightstorm_target);
AddExecutor(ExecutorType.Activate,CardID.foolishBurial,foolish_burial_target); AddExecutor(ExecutorType.Activate,CardId.foolishBurial,foolish_burial_target);
AddExecutor(ExecutorType.Activate,CardID.mathmechEquation,mathmech_equation_target); AddExecutor(ExecutorType.Activate,CardId.mathmechEquation,mathmech_equation_target);
AddExecutor(ExecutorType.Activate,CardID.PotOfDesires); AddExecutor(ExecutorType.Activate,CardId.PotOfDesires);
AddExecutor(ExecutorType.Summon, CardID.MathmechNebla); AddExecutor(ExecutorType.Summon, CardId.MathmechNebla);
AddExecutor(ExecutorType.Summon,CardID.BalancerLord ); AddExecutor(ExecutorType.Summon,CardId.BalancerLord );
AddExecutor(ExecutorType.Summon, CardID.Mathmechdouble); AddExecutor(ExecutorType.Summon, CardId.Mathmechdouble);
AddExecutor(ExecutorType.Summon, CardID.MathmechSubtra); AddExecutor(ExecutorType.Summon, CardId.MathmechSubtra);
AddExecutor(ExecutorType.Summon, CardID.MathmechAddition); AddExecutor(ExecutorType.Summon, CardId.MathmechAddition);
AddExecutor(ExecutorType.Summon, CardID.MathmechDivision); AddExecutor(ExecutorType.Summon, CardId.MathmechDivision);
AddExecutor(ExecutorType.Summon, CardID.MathmechDivision); AddExecutor(ExecutorType.Summon, CardId.MathmechDivision);
AddExecutor(ExecutorType.Activate, CardID.MathmechSigma); AddExecutor(ExecutorType.Activate, CardId.MathmechSigma);
AddExecutor(ExecutorType.Activate,CardID.threanteningRoar); AddExecutor(ExecutorType.Activate,CardId.threanteningRoar);
//xyz summons //xyz summons
AddExecutor(ExecutorType.SpSummon, CardID.Mathmechalem, when_Mathmechalem); AddExecutor(ExecutorType.SpSummon, CardId.Mathmechalem, when_Mathmechalem);
//xyz effects //xyz effects
AddExecutor(ExecutorType.Activate, CardID.Mathmechalem, mathchalenEffect); AddExecutor(ExecutorType.Activate, CardId.Mathmechalem, mathchalenEffect);
//Synchro //Synchro
AddExecutor(ExecutorType.SpSummon, CardID.MathmechFinalSigma , FinalSigmaSummon); AddExecutor(ExecutorType.SpSummon, CardId.MathmechFinalSigma , FinalSigmaSummon);
AddExecutor(ExecutorType.Activate, CardID.Mathmechdouble, doubleEffect); AddExecutor(ExecutorType.Activate, CardId.Mathmechdouble, doubleEffect);
//normal effects //normal effects
AddExecutor(ExecutorType.Activate, CardID.MathmechNebla, NeblaEffect); AddExecutor(ExecutorType.Activate, CardId.MathmechNebla, NeblaEffect);
AddExecutor(ExecutorType.Activate,CardID.MathmechDivision , divisionEffect); AddExecutor(ExecutorType.Activate,CardId.MathmechDivision , divisionEffect);
AddExecutor(ExecutorType.Activate,CardID.BalancerLord , active_balancer); AddExecutor(ExecutorType.Activate,CardId.BalancerLord , active_balancer);
AddExecutor(ExecutorType.Activate, CardID.MathmechSubtra , whom_subtra); AddExecutor(ExecutorType.Activate, CardId.MathmechSubtra , whom_subtra);
AddExecutor(ExecutorType.Activate, CardID.MathmechAddition , whom_addition); AddExecutor(ExecutorType.Activate, CardId.MathmechAddition , whom_addition);
//spell effects //spell effects
AddExecutor(ExecutorType.Activate, CardID.cynetmining , how_to_cynet_mine); AddExecutor(ExecutorType.Activate, CardId.cynetmining , how_to_cynet_mine);
AddExecutor(ExecutorType.SpSummon, CardID.MathmechMagma, MagmaSummon); AddExecutor(ExecutorType.SpSummon, CardId.MathmechMagma, MagmaSummon);
AddExecutor(ExecutorType.Activate,CardID.MathmechFinalSigma); AddExecutor(ExecutorType.Activate,CardId.MathmechFinalSigma);
AddExecutor(ExecutorType.Activate,CardID.MathmechMagma); AddExecutor(ExecutorType.Activate,CardId.MathmechMagma);
//function //function
...@@ -155,9 +155,9 @@ namespace WindBot.Game.AI.Decks ...@@ -155,9 +155,9 @@ namespace WindBot.Game.AI.Decks
private bool active_balancer() private bool active_balancer()
{ {
if (Bot.HasInHand(CardID.MathmechNebla)) if (Bot.HasInHand(CardId.MathmechNebla))
{ {
AI.SelectCard(CardID.MathmechNebla); AI.SelectCard(CardId.MathmechNebla);
return true; return true;
} }
else else
...@@ -182,9 +182,9 @@ namespace WindBot.Game.AI.Decks ...@@ -182,9 +182,9 @@ namespace WindBot.Game.AI.Decks
private bool mathmech_equation_target() private bool mathmech_equation_target()
{ {
if (Bot.HasInGraveyard(CardID.MathmechNebla)) if (Bot.HasInGraveyard(CardId.MathmechNebla))
{ {
AI.SelectCard(CardID.MathmechNebla); AI.SelectCard(CardId.MathmechNebla);
return true; return true;
} }
else else
...@@ -196,29 +196,29 @@ namespace WindBot.Game.AI.Decks ...@@ -196,29 +196,29 @@ namespace WindBot.Game.AI.Decks
private bool foolish_burial_target() private bool foolish_burial_target()
{ {
AI.SelectCard(CardID.MathmechNebla); AI.SelectCard(CardId.MathmechNebla);
return true; return true;
} }
private bool how_to_cynet_mine() private bool how_to_cynet_mine()
{ {
AI.SelectCard(Util.GetWorstBotMonster()); AI.SelectCard(Util.GetWorstBotMonster());
if (!Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardID.MathmechSigma)) if (!Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.MathmechSigma))
{ {
AI.SelectNextCard(CardID.MathmechSigma); AI.SelectNextCard(CardId.MathmechSigma);
return true; return true;
} }
return true; return true;
} }
private bool when_Mathmechalem() private bool when_Mathmechalem()
{ {
if (Bot.HasInMonstersZone(CardID.MathmechNebla)){ if (Bot.HasInMonstersZone(CardId.MathmechNebla)){
return false; return false;
} }
else if(Bot.HasInMonstersZone(CardID.MathmechSigma) && Bot.HasInMonstersZone(CardID.Mathmechdouble)) else if(Bot.HasInMonstersZone(CardId.MathmechSigma) && Bot.HasInMonstersZone(CardId.Mathmechdouble))
{ {
return false; return false;
} }
else if (Bot.HasInMonstersZone(CardID.Mathmechalem)) else if (Bot.HasInMonstersZone(CardId.Mathmechalem))
{ {
return false; return false;
} }
...@@ -233,7 +233,7 @@ namespace WindBot.Game.AI.Decks ...@@ -233,7 +233,7 @@ namespace WindBot.Game.AI.Decks
{ {
return false; return false;
} }
if ((Bot.HasInMonstersZone(CardID.Mathmechdouble) && (( Bot.HasInMonstersZone(CardID.MathmechSigma)) || Bot.HasInMonstersZone(CardID.MathmechNebla)))) if ((Bot.HasInMonstersZone(CardId.Mathmechdouble) && (( Bot.HasInMonstersZone(CardId.MathmechSigma)) || Bot.HasInMonstersZone(CardId.MathmechNebla))))
{ {
AI.SelectPosition(CardPosition.Attack); AI.SelectPosition(CardPosition.Attack);
try { AI.SelectPlace(Zones.ExtraMonsterZones); } try { AI.SelectPlace(Zones.ExtraMonsterZones); }
...@@ -249,16 +249,16 @@ namespace WindBot.Game.AI.Decks ...@@ -249,16 +249,16 @@ namespace WindBot.Game.AI.Decks
} }
private bool NeblaEffect() private bool NeblaEffect()
{ {
bool a = Bot.HasInMonstersZone(CardID.MathmechSubtra) || Bot.HasInMonstersZone(CardID.securitytoken) || Bot.HasInMonstersZone(CardID.MathmechSigma) || Bot.HasInMonstersZone(CardID.MathmechAddition) || Bot.HasInMonstersZone(CardID.Mathmechalem) || Bot.HasInMonstersZone(CardID.MathmechDivision); bool a = Bot.HasInMonstersZone(CardId.MathmechSubtra) || Bot.HasInMonstersZone(CardId.securitytoken) || Bot.HasInMonstersZone(CardId.MathmechSigma) || Bot.HasInMonstersZone(CardId.MathmechAddition) || Bot.HasInMonstersZone(CardId.Mathmechalem) || Bot.HasInMonstersZone(CardId.MathmechDivision);
if (a) if (a)
{ {
List<int> cards = new List<int>(); List<int> cards = new List<int>();
cards.Add(CardID.MathmechSigma); cards.Add(CardId.MathmechSigma);
cards.Add(CardID.MathmechSubtra); cards.Add(CardId.MathmechSubtra);
cards.Add(CardID.MathmechAddition); cards.Add(CardId.MathmechAddition);
cards.Add(item:CardID.MathmechDivision); cards.Add(item:CardId.MathmechDivision);
cards.Add(item:CardID.Mathmechalem); cards.Add(item:CardId.Mathmechalem);
cards.Add(CardID.securitytoken); cards.Add(CardId.securitytoken);
int u = 0; int u = 0;
List<ClientCard> monsters = Bot.GetMonstersInMainZone(); List<ClientCard> monsters = Bot.GetMonstersInMainZone();
for (int i = 0; i < monsters.Count; i++) for (int i = 0; i < monsters.Count; i++)
...@@ -270,11 +270,11 @@ namespace WindBot.Game.AI.Decks ...@@ -270,11 +270,11 @@ namespace WindBot.Game.AI.Decks
} }
else else
{ {
u = CardID.securitytoken; u = CardId.securitytoken;
} }
} }
AI.SelectCard(CardID.securitytoken); AI.SelectCard(CardId.securitytoken);
AI.SelectNextCard(CardID.Mathmechdouble); AI.SelectNextCard(CardId.Mathmechdouble);
return true; return true;
...@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks ...@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
} }
private bool doubleEffect() private bool doubleEffect()
{ {
if (Bot.HasInMonstersZone(CardID.MathmechNebla) || Bot.HasInMonstersZone(CardID.MathmechSigma)) if (Bot.HasInMonstersZone(CardId.MathmechNebla) || Bot.HasInMonstersZone(CardId.MathmechSigma))
{ {
return true; return true;
}; };
...@@ -311,32 +311,32 @@ namespace WindBot.Game.AI.Decks ...@@ -311,32 +311,32 @@ namespace WindBot.Game.AI.Decks
{ {
return false; return false;
} }
if ( (Bot.HasInHandOrInGraveyard(CardID.MathmechNebla) && !Bot.HasInMonstersZone(CardID.MathmechNebla)) && (Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0)) ) if ( (Bot.HasInHandOrInGraveyard(CardId.MathmechNebla) && !Bot.HasInMonstersZone(CardId.MathmechNebla)) && (Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0)) )
{ {
AI.SelectCard(CardID.Mathmechalem); AI.SelectCard(CardId.Mathmechalem);
AI.SelectNextCard(CardID.MathmechNebla); AI.SelectNextCard(CardId.MathmechNebla);
return true; return true;
} }
if (Bot.HasInHandOrInGraveyard(CardID.Mathmechdouble) && if (Bot.HasInHandOrInGraveyard(CardId.Mathmechdouble) &&
(Bot.HasInMonstersZone(CardID.MathmechNebla) || Bot.HasInMonstersZone(CardID.MathmechSigma)) && (Bot.HasInMonstersZone(CardId.MathmechNebla) || Bot.HasInMonstersZone(CardId.MathmechSigma)) &&
Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0)) Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0))
{ {
AI.SelectCard(CardID.Mathmechalem); AI.SelectCard(CardId.Mathmechalem);
AI.SelectNextCard(CardID.Mathmechdouble); AI.SelectNextCard(CardId.Mathmechdouble);
return true; return true;
} }
if (!Bot.HasInHandOrInGraveyard(CardID.MathmechNebla) && Card.HasXyzMaterial(2)) if (!Bot.HasInHandOrInGraveyard(CardId.MathmechNebla) && Card.HasXyzMaterial(2))
{ {
AI.SelectCard(CardID.MathmechNebla); AI.SelectCard(CardId.MathmechNebla);
AI.SelectThirdCard(CardID.MathmechNebla); AI.SelectThirdCard(CardId.MathmechNebla);
return true; return true;
} }
if (!Bot.HasInHandOrInGraveyard(CardID.MathmechSigma) && Card.HasXyzMaterial(2)) if (!Bot.HasInHandOrInGraveyard(CardId.MathmechSigma) && Card.HasXyzMaterial(2))
{ {
AI.SelectCard(CardID.MathmechSigma); AI.SelectCard(CardId.MathmechSigma);
AI.SelectThirdCard(CardID.MathmechSigma); AI.SelectThirdCard(CardId.MathmechSigma);
return true; return true;
} }
else else
...@@ -349,12 +349,12 @@ namespace WindBot.Game.AI.Decks ...@@ -349,12 +349,12 @@ namespace WindBot.Game.AI.Decks
private bool MagmaSummon() private bool MagmaSummon()
{ {
if (Bot.HasInMonstersZone(CardID.MathmechNebla)) if (Bot.HasInMonstersZone(CardId.MathmechNebla))
{ {
return false; return false;
} }
if (Bot.HasInMonstersZone(CardID.MathmechSigma) && Bot.HasInMonstersZone(CardID.Mathmechdouble)) if (Bot.HasInMonstersZone(CardId.MathmechSigma) && Bot.HasInMonstersZone(CardId.Mathmechdouble))
{ {
return false; return false;
} }
...@@ -366,7 +366,7 @@ namespace WindBot.Game.AI.Decks ...@@ -366,7 +366,7 @@ namespace WindBot.Game.AI.Decks
public override int OnSelectPlace(int cardId, int player, CardLocation location, int available) public override int OnSelectPlace(int cardId, int player, CardLocation location, int available)
{ {
if (cardId == CardID.MathmechFinalSigma) if (cardId == CardId.MathmechFinalSigma)
{ {
if ((Zones.z5 & available) > 0) return Zones.z5; if ((Zones.z5 & available) > 0) return Zones.z5;
if ((Zones.z6 & available) > 0) return Zones.z6; if ((Zones.z6 & available) > 0) return Zones.z6;
......
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