Files
khallaandClaude Opus 5.5 1fd89524d3 Skills, auto-attack, aura and chain lightning rework, Esc, cache fix
- Skill bar: no art selection; slot 0 is the right-click art, keys 0-6 cast
  slots directly; cooldown labels in exact seconds; slot 0 set apart.
- Arts regenerate on their own (casting no longer refills the group).
- Auto-attack after targeting or casting at a hostile creature, at the speed
  of a held button.
- Auras can be recast while active (renew, no second visual).
- Blicke wie Klingen hits every enemy in range, physical, with life leech.
- Blitzschlag steers the game's own chain: 3 + level/5 hits, 1 + level/10
  chains, re-hits a lone enemy.
- Weapon sets: click selects, drag only from the selected set; the leftmost
  set is clickable (signed hit tests).
- Esc closes open windows before opening the game menu.
- HUD: standalone buttons and texts are centred.
- Record cache sized for widened views (town lag while walking).
- Shared game code: orders, fx events, text drawing, cooldowns, effects.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 00:11:38 +02:00

45 lines
2.2 KiB
Markdown

# Periodic aura hits (`src/mods/aurahits.cpp`)
Rebalancing request (user, 2026-10-15): "Blicke wie Klingen" (art 0x3f8,
`GUI_MOVE_KLINGENBLICK`) hit only one enemy per tick; it should hit all
enemies in range.
## What the game does (measured with a hit log, 2026-10-15)
The aura gives the hero an effect of kind 0x12 (value 0x445f in the test).
Its hits reach the enemies as `cEvent_creature` 5 (attacker id at +8, the
damage at +0x18.. in one of four damage-type slots, chosen at random), sent
from `0x56323d`, one enemy about once per second.
Code (creature arts update, branch `0x562f08`, only for effects of kind 0x12
of the local player's creature):
- timer at effect +8 (a vector holding one int, ms); every 1000 ms:
- walk the creatures near the player (`0xad1c60`, 8 bytes each, count
`0xad1b48`); a creature within `(cCreatureArts +0x56 + 20) * 10` of the
owner (`cCreature::DistanceTo` `0x536f20`) becomes the target if there is
none yet, otherwise replaces it with 1/3 chance;
- player heroes as targets go through PvP checks (`0x4d4be0`);
- the hit: `cEvent_creature` 5 built on the stack, sent with the target's
`ReceiveOrder` (vf18).
## The mod
`mov eax, [ecx]; call [eax+18h]` at `0x56323b` becomes a call of
`HitAllInRange` (via a thunk passing ebp = cCreatureArts and ebx = the
effect's offset): the chosen enemy gets its hit, then every other living
creature of the nearby list within the same range gets a copy of the same
hit. Player heroes are skipped (they need the PvP checks). Applies to every
effect of kind 0x12, i.e. by behaviour, not by art id.
## Damage type and life leech (2026-10-15)
- The game puts the aura's value into one of the four damage slots at
random (physical, fire, magic, poison), so a quarter of the ticks poisoned;
the mod makes every aura hit physical (user's choice).
- Life leech, its beam and sound are applied by the damage code (`0x56aff0`,
leech block `0x5707a4`..`0x570a88`: property 0x349 x difficulty factor x
damage x distance falloff, capped at max health) for the hit's attacker,
order +0x1c. Weapon hits carry the hero's id there, enemy hits the enemy's,
aura hits 0, so they never leeched. The mod sets it to the aura's owner.