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.
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:
| Step | Processor | What it does |
|---|---|---|
| 1. Move | EnemyMoveBehaviourProcessor → EnemyMoveAbility | Advance toward the hero along the enemy's lane by MoveSpeed tiles (DOTween). |
| 2. Attack | EnemyAttackBehaviourProcessor → the unit's one EnemyAttackAbility | If the hero is within reach (EnemyConfig.AttackRange), run Attack() on the single attached attack ability. |
| 3. Retreat | EnemyRetreatBehaviourProcessor (RetreatDistance) / EnemyMoveBackAfterAttackAbility | After 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).
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 ability | Moves the enemy? | Behaviour | Typical users |
|---|---|---|---|
EnemyMeleeAttackAbility | No | Animation + EnemyDamageAbility hit when adjacent. Fields: _animationAbility, _damageAbility. | Rat-type melee (AttackRange 0) |
EnemyRangedAttackAbility | No | Fires from range (extends EnemyAttackAbility). | Ranged enemies (AttackRange 5, e.g. CannonBoar) INFER |
EnemyTuskAttackAbility | Yes — lunges | Owns 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.
Decompiled EnemyTuskAttackAbility.<Attack>d__4.MoveNext (RVA 0x2EF3CC0). The call sequence is:
GetDestinationPosition() — compute the lunge target (the hero's position on the lane).DOMoveX(transform, destination, duration) — DOTween dash of the enemy's X to that point. This is the visible charge. Awaited via ToUniTask(tween).SetTrigger / TriggerAttack + WaitEvent(id) — play the gore animation, wait for the hit frame.HandleHit() — apply damage through EnemyDamageAbility.Two paired abilities complete it:
EnemyMovementDamageAbility — tracks distance moved and applies damage = accumulatedDistance × DamageDistanceRatio (fields DamageDistanceRatio, _accumulatedDistance; handlers HandleMoveStart/Tick/End). So a charge from farther away hits harder than a short lunge. FACTEnemyMoveBackAfterAttackAbility — after the gore, tweens back over a serialized duration with an ease (the recoil), then the turn ends. FACTEnemyMovementDamageAbility scales with distance, a long charge does more than a point-blank one. FACTEnemyMeleeAttackAbility (no dash); a ranged enemy uses EnemyRangedAttackAbility; the boar uses EnemyTuskAttackAbility. None of them switch attack type mid-fight.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).