Interfaces

A theoretical setup of how things could interact.

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:

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:

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.

 

Debuff:

Removes buffs/status effects/whatever.

 

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.

 

Special:

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