Class CombatRules
- Namespace
- SurvivorsMaker.Simulation
- Assembly
- SurvivorsMaker.Simulation.dll
Shared hit rules. Death collection belongs to the end of the tick.
public sealed class CombatRules : ICombat
- Inheritance
-
CombatRules
- Implements
- Inherited Members
Constructors
CombatRules()
public CombatRules()
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.
public 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.
public 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.
public 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.
public void HitPlayer(SimWorld world, int rawDamage, int sourceId)