1. The Hand of Merlin
  2. News
  3. Dev blog 10 - Ability status effects

Dev blog 10 - Ability status effects

Hello again!
In the previous post, I talked about our abilities, and in this one, I wanted to expand on the topic a bit. Specifically, I wanted to touch on status effects, because they’re the other part of what makes our abilities cool.



Any ability can grant a status effect to all targets in the area of effect. The area of effect is either a radius around the target tile or the entire map. The status effects have the expected functionality you’ve seen in other games - increasing stats, applying debuffs, damage over time, etc. Their functionality is split into 2 main parts - a passive and active component.
The passive component can be any flags that are boolean in nature - you either have them or you don’t, like Phasing, Immune to damage, React to attacks, and similar. They can also be numerical modifiers to any unit attribute - +10 to max health, -50% accuracy and so on.

The active component is a list of actions triggered by an event. Most of these events happen during the processing of any other ability, like dealing damage, killing a unit or spending all action points. The events can be filtered, so a status effect can only trigger its actions if, say, a friendly unit spends all action points or an enemy unit takes damage. The actions that trigger currently only apply to the unit affected by the status effect that triggers the actions. I have plans to change this so the unit that applied the effect can also be the target of the actions. The list of actions includes the classic ones - damage, healing, restoring action points or resetting ability cooldowns. Status effects can also grant other status effects through these actions, to make an infinite chain! (god, I hope not)



My favorite is the “use ability” action.
Yes, status effects can use other abilities, that could inflict other status effects, that could use their own abilities, etc. It’s kind of insane.
At some point in the dev process, we were tinkering with an enemy that, when killed, would spawn a smaller version of himself. The small one would run away from your units and regrow back into the full-sized unit. It’s a slightly annoying enemy, but hey, we were adding general functionality. It definitely didn’t help both of them had a ton of health…
Anyway, I implemented him by giving him an innate status effect that grants him an out of turn action when hit and also detects when he’s killed. When that happens, the status effect uses the Spawn Mini-Me ability on his own position, after which he promptly dies. The little guy, newly spawned, then runs away, uses a Grow ability and waits for a few turns. If you don’t kill him, he regrows back into the full unit by casting an ability on himself that changes his base unit class. The whole process was especially pleasing to me because it allowed me to delete a bunch of code that handled the specific “when a unit dies, use this ability” logic, and move it fully into the content.

There are going to a bunch more ability effects and status effect actions and modifiers. I’ll probably showcase them as we make more cool ones. Thanks for reading, come join the Discord server, or follow me on Twitter.

MarkoP