Debuff

Description

This will be a struct which will hold info about debuffs. They will have the start time(the time at which it was received by an enemy), duration, health modifier, physical/magical defense modifier, speed modifier, and damage/second. When an enemy gets a debuff on them it is stored in a list and then removed once its duration is up.

Relationships

  • Enemy : Made and used in the Enemy classes
  • Ability : an attribute of the Ability struct

Members

  • GameTime startTime - the time when the debuff was put on the enemy
  • double duration - the amount of time the debuff will last on an enemy
  • float healthModifier - the amount that the enemies max health is lowered/raised
  • float physicalDamageModifier - the amount that the enemies physical damage modifier is lowered/raised
  • float magicalDamageModifier - the amount that the enemies magical damage modifier is lowered/raised
  • float speedModifier - the amount that the enemies speed is lowered/raised
  • int damagePerSecond - the amount of damage done per second the debuff lasts on an enemy(negative for healing over time)

Methods

  • checkDamage
    • returns the amount of damage that should be done to the enemy based on startTime and the current time which is passed in
  • CheckIfOver
    • returns a bool indicating if the debuff is over based on the startTime, duration, and current time which is passed in
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License