public Warrior(bool isBoss, GameSessionViewModel _gameSessionViewModel, GameSessionView GSV) : base(_gameSessionViewModel, GSV) { this.Level = _level; double newHealth = Level + (Level * 2.6); this.Health = newHealth; this.IsAlive = true; this.MaxHealth = newHealth; GSV.EnemyHealthDisplay.Maximum = newHealth; GSV.EnemyHealthDisplay.Value = newHealth; this.BaseAttack = this.BaseAttack += (this.Level / 100) + .50; Random ranXPDrop = new Random(); this.XPDrop = ranXPDrop.Next(35, 60); Random goldRan = new Random(); this.GoldDrop = goldRan.Next(8, 14); this._imageString = "warrior-icon.png"; this.Name = "Warrior"; _gameSessionViewModel.CurrentEnemyID += 1; this.ID = _gameSessionViewModel.CurrentEnemyID; BasicHealingPotion potion = new BasicHealingPotion(_gameSessionViewModel, GSV); Excalibur excalibur = new Excalibur(_gameSessionViewModel, GSV); RubySword rubySword = new RubySword(_gameSessionViewModel, GSV); this.ItemDrop.Add(potion); this.ItemDrop.Add(excalibur); this.ItemDrop.Add(rubySword); // // if passed isBoss bool value is true, then set the property to true, otherwise set the property to false // isBoss = true ? IsBoss = isBoss : IsBoss = isBoss; }
public GameSessionView(GameSessionViewModel gameSessionViewModel) { _gameSessionViewModel = gameSessionViewModel; // ActiveEnemies.Items.Add("Testing"); InitializeComponent(); Messages = _gameSessionViewModel.Messages; PlayerHealth = _gameSessionViewModel.PlayerHealth; mapWindow.DataContext = gameSessionViewModel; menuWindow.DataContext = gameSessionViewModel; ActiveEnemies.DataContext = _gameSessionViewModel.CurrentEnemies; DataContext = gameSessionViewModel; inventoryWindow = new InventoryDisplay(_gameSessionViewModel, this); inventoryWindow.DataContext = _gameSessionViewModel; playerStatsWindow = new PlayerStatsDisplay(_gameSessionViewModel); enemyStatsWindow.DataContext = _gameSessionViewModel; playerStatsWindow.DataContext = _gameSessionViewModel; potion = new BasicHealingPotion(_gameSessionViewModel, this); sid = new TraderSid(_gameSessionViewModel, this); sid.AddBuyables(); _gameSessionViewModel.Sid = sid; _gameSessionViewModel.AccessibleLocations.Clear(); updateAccessibleLocations(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; }
public GameSessionView(GameSessionViewModel gameSessionViewModel) { _gameSessionViewModel = gameSessionViewModel; // ActiveEnemies.Items.Add("Testing"); InitializeComponent(); Messages = _gameSessionViewModel.Messages; PlayerHealth = _gameSessionViewModel.PlayerHealth; mapWindow.DataContext = gameSessionViewModel; menuWindow.DataContext = gameSessionViewModel; ActiveEnemies.DataContext = _gameSessionViewModel.CurrentEnemies; DataContext = gameSessionViewModel; playerStatsWindow = new PlayerStatsDisplay(_gameSessionViewModel); enemyStatsWindow.DataContext = _gameSessionViewModel; playerStatsWindow.DataContext = _gameSessionViewModel; potion = new BasicHealingPotion(_gameSessionViewModel); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; }
public Bandit(bool isBoss, GameSessionViewModel _gameSessionViewModel, GameSessionView GSV) : base(_gameSessionViewModel, GSV) { // // Can possibly move most of this stuff into the enemy class constructor // this.Level = _level; this.IsAlive = true; double newHealth = Level + (Level * 2.6); this.Health = newHealth; this.MaxHealth = newHealth; GSV.EnemyHealthDisplay.Value = newHealth; GSV.EnemyHealthDisplay.Maximum = newHealth; Random lvlRan = new Random(); this.Level = lvlRan.Next(15, 18); Random ran = new Random(); this.GoldDrop = ran.Next(10, 19); this._imageString = "Bandit.png"; Random ranXPDrop = new Random(); this.XPDrop = ranXPDrop.Next(20, 35); this.Name = "Bandit"; this.BaseAttack = this.BaseAttack += (this.Level / 100) + .75; _gameSessionViewModel.CurrentEnemyID += 1; this.ID = _gameSessionViewModel.CurrentEnemyID; // // Lootable items // BasicHealingPotion potion = new BasicHealingPotion(_gameSessionViewModel, GSV); Excalibur excalibur = new Excalibur(_gameSessionViewModel, GSV); RubySword rubySword = new RubySword(_gameSessionViewModel, GSV); this.ItemDrop.Add(potion); this.ItemDrop.Add(excalibur); this.ItemDrop.Add(rubySword); // // if passed isBoss bool value is true, then set the property to true, otherwise set the property to false // isBoss = true ? IsBoss = isBoss : IsBoss = isBoss; }
public void AddBuyables() { BasicHealingPotion potion = new BasicHealingPotion(gsm, gsv); BasicHealingPotion potion2 = new BasicHealingPotion(gsm, gsv); BasicHealingPotion potion3 = new BasicHealingPotion(gsm, gsv); BasicHealingPotion potion4 = new BasicHealingPotion(gsm, gsv); VestOfProtection vest = new VestOfProtection(gsm, gsv); vest.Value = 10; RubySword RubySword = new RubySword(gsm, gsv); Staff Magic_Staff = new Staff(gsm, gsv); Excalibur Excalibur = new Excalibur(gsm, gsv); Buyables.Add(vest); Buyables.Add(Magic_Staff); Buyables.Add(potion); Buyables.Add(potion2); Buyables.Add(potion3); Buyables.Add(potion4); Buyables.Add(RubySword); Buyables.Add(Excalibur); }
public Wizard(bool isBoss, GameSessionViewModel _gameSessionViewModel, GameSessionView GSV) : base(_gameSessionViewModel, GSV) { Random levelRan = new Random(); this.Level = levelRan.Next(30, 60);; double newHealth = Level + (Level * 2.6); this.Health = newHealth; this.IsAlive = true; this.MaxHealth = newHealth; GSV.EnemyHealthDisplay.Maximum = newHealth; GSV.EnemyHealthDisplay.Value = newHealth; this.BaseAttack = this.BaseAttack += (this.Level / 100) + .50; Random ranXPDrop = new Random(); this.XPDrop = ranXPDrop.Next(35, 60); Random goldRan = new Random(); this.GoldDrop = goldRan.Next(25, 66); this._imageString = "mage-icon.png"; this.Image = "mage-icon.png"; this.Name = "Wizard"; _gameSessionViewModel.CurrentEnemyID += 1; this.ID = _gameSessionViewModel.CurrentEnemyID; BasicHealingPotion potion = new BasicHealingPotion(_gameSessionViewModel, GSV); this.ItemDrop.Add(potion); Staff staff = new Staff(_gameSessionViewModel, GSV); this.ItemDrop.Add(potion); // // if passed isBoss bool value is true, then set the property to true, otherwise set the property to false // isBoss = true ? IsBoss = isBoss : IsBoss = isBoss; }