Skip to main content

Combat Events: Incoming

To try and keep it "modular" and work with composition, we'll define several interfaces that can have effects on the targeted entity.

Damage:

We'll define incoming damage as:

  • Amount (required)
  • Damage Type (optional)
  • Source (required, probably)

This allows us some flexibility in applying direct damage. The function that's called by this signal then calculates if there's any resistances, and logs the event in combat log.

 

Healing:

  • Amount
  • Source

Healing is a seperate interface because this makes it clearer that we can implement different functionality, like a "healing received" modifier for example when players have to protect an NPC, to not make it too easy. We want to keep this logic seperate from the damage logic.

Buff:

Buffs can be positive OR negative, since I did like the way it's done in 7 days to die - a buff adds some status effect, and debuff means the effect is removed.

  • Type (required) - a buff ID that we can look up in the skill database
  • Duration (optional, if there is a "standard" duration in the db)
  • Strength (optional) - if we implement a stat like "buff effect", we need this - likely for stuff like "burn dmg"
  • Source (required, probably)

Debuff:

Removes buffs/status effects/whatever.

  • Type (required) - we can look up what ID's are removed in the skill DB
  • Source (required, probably)

 

Special:

For things that do not fit in the other categories - For example, Resurrect skills, maybe Instant Kill events that can't be resisted, ...

  • Type (required)
  • Source (required, probably)