Buffs and Debuffs

These buffs/debuffs are planned for my game:

  • DamageOverTime: lose 1 hp per second for the duration (e.g. bleed, poison)
  • HealingOverTime: gain 1 hp per second for the duration (e.g. food)
  • Stun: unable to move/act for the duration (breaks upon damage)
  • Immobilize: unable to move for the duration
  • Slow: movement speed halved for the duration
  • Shield: absorbs damage up to the shield amount
  • Vengeance: when this ability is available, gained when blocking (up to 3)

These buffs/debuffs have to be stored in StatBlocks. The routine that gathers renderables should check each active StatBlock. Each of these types will have an associated icon. If they do have an animation (e.g. Shield), the animation info is stored in StatBlock. The sprites will be stored in PowerManager.

Other animations happen over the player when casting a new spell (e.g. Heal, Return). These could be simply handled as non-damaging Hazards.

Finally, some animations happen upon impact (e.g. blood spurt, electrical sparks). These can also be non-damaging Hazards created during the TakeHit() routines of Avatar/Enemy.

Actually, all after-effects should be applied by TakeHit(). Usually these will be debuffs set to the StatBlock.

Powers Analysis

Taking a look at each power and how they operate.

  • Shoot creates a Missile hazard. Already implemented.
  • Swing creates a Single hazard. Already implemented.
  • Lore isn’t implemented, not yet determined how this will be handled.
  • Return creates a NonDamage hazard; when the animation is done, set the teleportation variables. Maybe use some kind of return_countdown variable in StatBlock to facilitate this.
  • Bleed upon hit sets a DamageOverTime debuff. Create a blood spurt NonDamage hazard.
  • Block is a special case. It is a unique state. Transition to the state when the block key is pressed. Transition back to Stance when the key is released. Set a “blocking” bool in StatBlock.
  • Shock is a Missile hazard. Upon impact it has to chain to another creature. Not sure the best way to implement this. Perhaps within HazardManager where it has access to enemies and collision data. The routine should be in PowerManager itself; HazardManager should call that routine and pass the needed data (collision info and living enemy positions). This is such a specific implementation that it might slip to another release. Tagged with Air trait.
  • Heal creates a NonDamage hazard and sets hp. Not yet implemented.
  • Multishot creates three Missile Hazards. When I convert to polar coordinates I can offset (+/-) Theta to get the angle of these side missiles. Multi hit is handled by the 5 frame invulnerability.
  • Warcry removes all debuffs from StatBlock. Create a Single hazard that doesn’t do damage but has the Fear after-effect.
  • Quake creates a Single hazard with a Stun after-effect. Already implemented. Tagged with Earth trait.
  • Shield sets Shield in StatBlock. No hazard.
  • Cleave creates a Single multi-target hazard with a very large radius
  • Charge requires a specific implementation. Probably needs to be a distinct Avatar/Enemy state with increased speed at a floating point (x,y) angle. Basically the hero becomes a missile. Stun after-effect.
  • Freeze is a series of Single hazards with execution delays. Care should be taken to not let Freeze travel past walls, so PowerManager might need a copy of the collision grid. Tagged with Ice trait.
  • Teleport creates a NonDamage hazard and sets an intramap teleport at the mouse target location.
  • Piercing Shot creates a multitarget Missile hazard tagged with ArmorPiercing trait.
  • Vengeance causes a stack of Vengeance buff to be created when taking a hit. Casting Vengeance creates a Single hazard with increased accuracy/crit and removes Vengeance stacks.
  • Burn causes a Single hazard with wide radius. Already implemented.
  • Time Stop creates a wide-radius hazard with the Stun aftereffect.

Leave a Reply

Your email address will not be published. Required fields are marked *