public BattleGym(Pokemon _PlayerPokemon, Pokemon _OpponentPokemon, WinMethod _Win, LoseMethod _Lose) { //Winmethod and Losemethod passed in from presenter module (Define the change in view?) rand = new Random(); PlayerPokemon = _PlayerPokemon; OpponentPokemon = _OpponentPokemon; win = _Win; lose = _Lose; ppSkilltime = new int[3] { 1, 20, 50 }; opSkilltime = new int[3] { 2, 25, 55 }; CurrentTurn = 1; if (PlayerPokemon.GetCP > 2000) { PlayerCriticalRate = 0.3; } else if (PlayerPokemon.GetCP > 1000) { PlayerCriticalRate = 0.2; } else { PlayerCriticalRate = 0.1; } if (OpponentPokemon.GetCP > 2000) { OpponentCriticalRate = 0.3; } else if (OpponentPokemon.GetCP > 1000) { OpponentCriticalRate = 0.2; } else { OpponentCriticalRate = 0.1; } }
public BattleGym(Pokemon _PlayerPokemon, Pokemon _OpponentPokemon, WinMethod _Win, LoseMethod _Lose) { //Winmethod and Losemethod passed in from presenter module (Define the change in view?) rand = new Random(); PlayerPokemon = _PlayerPokemon; OpponentPokemon = _OpponentPokemon; win = _Win; lose = _Lose; skilltime = new int[3] { 20, 5, 1 }; // How many times can be used for each skill opponentSkilltime = new int[3] { 40, 20, 10 }; // How many times can be used for each skill for opponentPokemon CurrentTurn = 1; if (PlayerPokemon.GetCP > 2000) { PlayerCriticalRate = 0.3; } else if (PlayerPokemon.GetCP > 1000) { PlayerCriticalRate = 0.2; } else { PlayerCriticalRate = 0.1; } if (OpponentPokemon.GetCP > 2000) { OpponentCriticalRate = 0.3; } else if (OpponentPokemon.GetCP > 1000) { OpponentCriticalRate = 0.2; } else { OpponentCriticalRate = 0.1; } }