Enemy attacks & the boar charge

How Claw Master resolves an enemy's turn, the three attack types in the roster, and a decompiled walk-through of the boar's charge. Answers the question: does a boar ever do anything but charge? Turn/behaviour structure and the charge sequence are decompiled from libil2cpp.so (arm64); the per-enemy prefab wiring is the one inferred link, flagged below.

Short answer: An enemy runs exactly one attack ability — there's no per-turn choice between two attacks. The boar's "rush in + gore" are two phases of a single ability (EnemyTuskAttackAbility), not two attacks. So yes — every boar attack is the charge. Different enemies use different single attack abilities (melee / ranged / tusk-charge); a boar doesn't switch.

1 · How a turn resolves FACT

Combat is turn-based (TakingTurnAbility, EnemyTurnBehaviourAbility.NextTurn). On its turn each enemy runs a small behaviour tree built by DefaultEnemyTurnBehaviourAbility.CreateBehaviourSettings() — three processors in sequence:

StepProcessorWhat it does
1. MoveEnemyMoveBehaviourProcessorEnemyMoveAbilityAdvance toward the hero along the enemy's lane by MoveSpeed tiles (DOTween).
2. AttackEnemyAttackBehaviourProcessor → the unit's one EnemyAttackAbilityIf the hero is within reach (EnemyConfig.AttackRange), run Attack() on the single attached attack ability.
3. RetreatEnemyRetreatBehaviourProcessor (RetreatDistance) / EnemyMoveBackAfterAttackAbilityAfter attacking, tween back (the recoil), then end turn.

So the loop per enemy turn is approach → strike → fall back. "How often" = once per enemy turn while in range; there is no cooldown or proc-chance field on EnemyConfig (it exposes only AttackRange / Damage / Health / MoveSpeed / AddValue1 / AddValue2).

2 · One attack ability per enemy — the three types FACT

EnemyAttackBehaviourProcessor runs whatever single EnemyAttackAbility is attached to the enemy. It does not pick between several. Three concrete subclasses exist across the whole roster:

Attack abilityMoves the enemy?BehaviourTypical users
EnemyMeleeAttackAbilityNoAnimation + EnemyDamageAbility hit when adjacent. Fields: _animationAbility, _damageAbility.Rat-type melee (AttackRange 0)
EnemyRangedAttackAbilityNoFires from range (extends EnemyAttackAbility).Ranged enemies (AttackRange 5, e.g. CannonBoar) INFER
EnemyTuskAttackAbilityYes — lungesOwns an EnemyMoveAbility → the attack itself dashes the enemy into the target, then hits. This is the only attack class that charges.The tusked chargers (boar / tusk family) INFER

The decisive structural fact: only EnemyTuskAttackAbility holds a _moveAbility. Melee and ranged attacks don't move the unit. So the only attack that "charges" is the tusk attack — and since the boar visibly charges, that is the boar's (single) attack ability.

3 · The charge, step by step FACT (decompiled)

Decompiled EnemyTuskAttackAbility.<Attack>d__4.MoveNext (RVA 0x2EF3CC0). The call sequence is:

  1. GetDestinationPosition() — compute the lunge target (the hero's position on the lane).
  2. DOMoveX(transform, destination, duration) — DOTween dash of the enemy's X to that point. This is the visible charge. Awaited via ToUniTask(tween).
  3. SetTrigger / TriggerAttack + WaitEvent(id) — play the gore animation, wait for the hit frame.
  4. HandleHit() — apply damage through EnemyDamageAbility.

Two paired abilities complete it:

4 · So does a boar ever not charge?

No second attack type. FACT The attack processor executes one ability; a boar's only attack ability is the tusk charge, so every boar attack is the charge. What looks like "two things" (rushing in, then goring) is the two phases of that one ability — move (DOMoveX) then hit (HandleHit). The only variation is magnitude: because EnemyMovementDamageAbility scales with distance, a long charge does more than a point-blank one. FACT

What differs is per-enemy, not per-turn. FACT A Rat uses EnemyMeleeAttackAbility (no dash); a ranged enemy uses EnemyRangedAttackAbility; the boar uses EnemyTuskAttackAbility. None of them switch attack type mid-fight.

Facts / inferences / gaps

FACT (decompiled / class structure): the turn behaviour tree (Move→Attack→Retreat), one attack ability per enemy, the three attack classes, the tusk charge sequence (GetDestinationPosition → DOMoveX → anim hit → HandleHit), movement-damage scaling with distance, and the move-back recoil. INFER: that the Boar prefab specifically is wired to EnemyTuskAttackAbility (vs Melee) — strongly implied because it's the only charging attack and the boar charges, but the wiring lives in the prefab. UNKNOWN / GAP: exact serialized numbers — charge duration, recoil duration/ease, and DamageDistanceRatio — are on the enemy prefab (binary asset bundle), not the online config; reading them needs prefab extraction. The precise in-range trigger condition lives in EnemyAttackBehaviourProcessor.OnTick (not yet decompiled to the byte).