public static void AwardTrophy(int iD, RichTextBox rtbBattleMonitor) { Trophy currentTrophy = World.TrophyByID(iD); if (!currentTrophy.PlayerHasTrophy) { Player.Trophies.Add(currentTrophy); currentTrophy.PlayerHasTrophy = true; rtbBattleMonitor.Text += "You have been awarded the " + currentTrophy.Name + " Trophy" + Environment.NewLine; } }
public Tournament(int id, int townID, string name, string description, Trophy trophy, int rewardGold, int rewardExp, List <Gladiator> enemyTeam) { ID = id; Name = name; Description = description; Trophy = trophy; RewardGold = rewardGold; RewardExp = rewardExp; EnemyTeam = enemyTeam; foreach (Gladiator glad in enemyTeam) { glad.LevelUpGladiator(); } TownID = townID; }
private static void LoadTrophies(List <string> trophyNumbers, List <Trophy> tempTrophies) { try { foreach (string number in trophyNumbers) { Trophy.LoadTrophy(Int32.Parse(number), tempTrophies); } return; } catch { loadSuccessfull = false; return; } }
public void BattleWon() { rtbBattleMonitor.Text += "You've won the tournament!" + Environment.NewLine; rtbBattleMonitor.Text += "You win " + Player.CurrentTournament.RewardGold + " gold." + Environment.NewLine; Player.Gold += Player.CurrentTournament.RewardGold; foreach (Gladiator glad in MyTeam) { if (glad.State == State.alive) { int expDifference = glad.potentialEXP - glad.EXP; glad.EXP = glad.potentialEXP; glad.EXP += Player.CurrentTournament.RewardExp; rtbBattleMonitor.Text += glad.Name + " has been rewarded " + (Player.CurrentTournament.RewardExp + expDifference) + " EXP." + Environment.NewLine; glad.LevelUpGladiator(rtbBattleMonitor); } } Trophy.AwardTrophy(Player.CurrentTournament.ID, rtbBattleMonitor); endBattle.Visible = true; }
public static void LoadTrophy(int iD, List <Trophy> tempTrophies) { Trophy currentTrophy = World.TrophyByID(iD); tempTrophies.Add(currentTrophy); }