Interface ICombat

Namespace
SurvivorsMaker.Simulation
Assembly
SurvivorsMaker.Simulation.dll

Damage and healing rules that several systems call. Implemented in World/.

public interface ICombat

Methods

DamageEnemy(SimWorld, Enemy, int, SimEventKind)

Damage that is not a weapon hit (status ticks, explosions, chains, trigger effects): applies damage (elite armor and boss invulnerability included) and emits kind (EnemyDamaged or StatusDamage). No on-hit heal, knockback, hit effects or OnHit triggers. HitSource is set by the caller when a weapon is behind it.

void DamageEnemy(SimWorld world, Enemy target, int damage, SimEventKind kind)

Parameters

world SimWorld
target Enemy
damage int
kind SimEventKind

HealPlayer(SimWorld, int)

Heals a living player up to max health. Returns the amount healed.

int HealPlayer(SimWorld world, int amount)

Parameters

world SimWorld
amount int

Returns

int

HitEnemy(SimWorld, Enemy, int, bool, int, Vec2, float)

A weapon hit: applies damage, emits EnemyDamaged, rolls on-hit heal, applies knockback in knockbackDirection. Death is collected later in the tick.

void HitEnemy(SimWorld world, Enemy target, int damage, bool crit, int slot, Vec2 knockbackDirection, float knockback)

Parameters

world SimWorld
target Enemy
damage int
crit bool
slot int
knockbackDirection Vec2
knockback float

HitPlayer(SimWorld, int, int)

Contact or enemy projectile: dodge roll, armor, damage, events. Raw ≤ 0 does nothing.

void HitPlayer(SimWorld world, int rawDamage, int sourceId)

Parameters

world SimWorld
rawDamage int
sourceId int