public int DealDamage(Pepe target) { int damage = CalculateDamage(); target.ReceiveDamage(damage); return(damage); }
private void GameOver(Pepe lostPepe) { MessageBox.Show("Pepe " + lostPepe.Name + " Lost the game!"); btnRestart.IsEnabled = true; btnLeftAttack.IsEnabled = false; btnRightAttack.IsEnabled = false; }
private void ShowDamageMessage(Pepe dmgDealer, int amountOfDamage) { if (amountOfDamage > 20) { MessageBox.Show(dmgDealer.Name + " DEALT A CRITICAL HIT OF " + amountOfDamage + "!!!"); } else if (amountOfDamage == 0) { MessageBox.Show(dmgDealer.Name + " MISSED!!!"); } }
private void StartOrReboot() { btnRestart.IsEnabled = false; leftPepe = new Pepe("Pepe Left"); rightPepe = new Pepe("Pepe Right"); imgPepeLeft.Opacity = 1; imgPepeRight.Opacity = 1; pbHpRight.Maximum = rightPepe.Healthpoints; pbHpLeft.Maximum = leftPepe.Healthpoints; UpdatePepes(); if (random.Next(0, 50) > 25) { btnLeftAttack.IsEnabled = false; btnRightAttack.IsEnabled = true; } else { btnLeftAttack.IsEnabled = true; btnRightAttack.IsEnabled = false; } }