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.

  • Buff ID (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.

  • Debuff Skill ID (required) - we can look up what Buff Types are removed in the skill DB
  • Source (required, probably)

 

Movement:

Moves the entity. Can be friendly or hostile. "grappling" means a constant "force" is applied, pulling entity towards target location.

Game Design Note: Heavily prefer both firendly and hostile movement to be skills cast by the player. Avoid situations where players get moved against their will, except maybe bossfights.

  • Type (required) - Teleport, Fixed Dash, Grappling
  • Target Location (optional) - Required for Teleport and Grappling types. 
  • Direction  (optional) - A vector. Usually required for Dash.
  • Speed (optional) - for dash and grappling type. 
  • Duration (optional) - for dash and grappling type.
  • 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)