Taunting
The taunting option gives the player the ability to take blows but come back even stronger. Sometimes it is best to hit hard and slow rather than fast and weak.
private void buttonTaunt_Click(object sender, EventArgs e)
{
if (enemy.Health > 0)
{
enemy.OnAttack(-2);
}
UpdateStats();
if (player.Health <= 0)
{
FrmGameOver frmGameOver = new FrmGameOver();
frmGameOver.Show();
instance = null;
Close();
}
else if (enemy.Health <= 0)
{
player.Score += 20;
instance = null;
Close();
}
player.buffAttack();
}
The code is nearly identical to that of the normal attacks but instead of actually attacking, you simply get hit but do more damage with your next attacks. I implement this with the player.buffAttack(); at the end of the code.
Last updated