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
worldSimWorldtargetEnemydamageintkindSimEventKind
HealPlayer(SimWorld, int)
Heals a living player up to max health. Returns the amount healed.
int HealPlayer(SimWorld world, int amount)
Parameters
Returns
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
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)