Fighting Mechanics - HoraceAndTheSpider/Bloodwych-68k GitHub Wiki

Fighting mechanics

Bloodwych resolves hand-to-hand combat from the attacker's Level, Strength and Agility, the defender's Level, Agility and armour, and a four-byte modifier record for the selected weapon. The SPS 439 implementation does not assign swords, axes or staffs to particular professions, and it does not grant a melee bonus for matching a weapon's apparent colour or magical alignment.

Selecting the weapon

The two hand slots are examined in a fixed order:

  1. the left-hand slot (pocket byte 0);
  2. the right-hand slot (pocket byte 1), but only when the left hand does not contain a melee weapon.

A melee weapon is any object from $30 through $3F. If both hands contain weapons from this range, only the left-hand weapon supplies combat modifiers. The two weapons are not combined and the stronger one is not selected automatically.

Weapon modifier records

The sixteen weapons $30-$3F have four unsigned modifier bytes each:

Field Effect
Random damage range Produces a random value from 1 through this number.
Fixed damage Added to every successful damage calculation.
Attack Added to the attacker's opposed attack score.
Defence Added to the holder's opposed defence score.

The ReSource extraction stores the complete 64-byte table as data/Weapon_CombatModifiers.stats: sixteen four-byte records in object order $30-$3F.

The SPS 439 values are:

Object Weapon Random damage Fixed damage Attack Defence
$30 Dagger 4 0 0 0
$31 Stealth Blade 6 3 10 0
$32 Short Sword 6 0 10 30
$33 Long Sword 8 0 5 5
$34 Mithril Sword 8 2 10 5
$35 Fleshbane 10 6 15 30
$36 Demon Blade 10 8 25 10
$37 Ace of Swords 16 25 60 50
$38 Battle Axe 10 0 0 0
$39 Mitril Axe 10 2 5 0
$3A Troll's Axe 12 4 0 0
$3B Brainbiter 12 6 10 5
$3C Deathbringer 12 8 15 0
$3D Staff 6 0 0 40
$3E Battle Staff 8 2 20 30
$3F Power Staff 12 2 25 40

The four fields make object order an unreliable guide to overall quality. A weapon may trade raw damage for accuracy or protection.

Cutpurses, daggers and rear attacks

Back-stabbing is explicitly tied to the Cutpurse profession. Before resolving the attack, the game examines the attacker's character number modulo four. Only character numbers $03,$07,$0B,$0F retain a possible rear-attack state; these are the four Cutpurses. The other three professions have that state cancelled.

When the rear-attack state is active:

  • the attack score is doubled;
  • damage before armour is tripled.

The held object is checked separately:

  • the Dagger and Stealth Blade ($30-$31) preserve the Cutpurse backstab;
  • swords, axes and staffs ($32-$3F) cancel it;
  • an object outside the melee-weapon range does not cancel it.

The last rule explains why a Cutpurse can produce the high backstab result while holding a bow or another non-blade object. A bow contributes no melee weapon modifiers—the physical attack falls back to its unarmed base values—but it does not disable the profession's attack and damage multipliers. Empty hands behave the same way.

This is therefore both a profession rule and a light-weapon rule: only Cutpurses can backstab, while Dagger, Stealth Blade, non-melee objects and empty hands allow the backstab to survive weapon selection.

Swords and axes

There is no Warrior-versus-Adventurer branch when the melee weapon record is loaded. Swords and axes differ through their numbers rather than through a hidden profession affinity:

  • swords generally supply useful attack and defence bonuses;
  • axes generally favour random and fixed damage, with little or no defence.

For example, Fleshbane and Deathbringer both add 15 to attack. Fleshbane has random damage 1-10, fixed damage 6 and defence 30. Deathbringer has random damage 1-12, fixed damage 8 and no defence bonus. Deathbringer therefore has the greater average raw weapon damage, while Fleshbane makes its holder substantially harder to hit.

Staffs and the Power Staff

Staffs are not restricted to Wizards by the melee routine:

  • the ordinary Staff is a weak damage weapon but supplies 40 defence;
  • the Battle Staff adds 20 attack and 30 defence;
  • the Power Staff adds 25 attack and 40 defence as well as its larger damage range.

The Power Staff has a separate magical effect. Holding it in either hand adds 5 to the spell-casting quality calculation. This bonus is available to any character holding the staff; the character's class and spell knowledge are still evaluated separately. No additional spell-casting bonus has been found for the ordinary Staff or Battle Staff.

Ace of Swords and Chaos Gloves

The Ace of Swords only receives its full table record when Chaos Gloves ($2B) are worn. Without the gloves it is reduced to:

Random damage Fixed damage Attack Defence
16 0 5 5

With Chaos Gloves it uses the full 16, 25, 60, 50 record. The gloves themselves do not add normal armour; their important function is enabling the sword.

No weapon-alignment affinity

The melee path does not compare a champion's Serpent, Moon, Dragon or Chaos alignment with the held weapon. Weapon names and colours can be thematically aligned, but they do not create an extra fighting bonus in SPS 439.

Blodwyn therefore receives no special Serpent bonus from Fleshbane. Between Fleshbane and Deathbringer she receives the same trade-off as any other champion: Fleshbane supplies defence, while Deathbringer supplies greater raw damage.

Attack and defence scores

For an unmodified champion, the principal scores can be expressed as follows. Integer divisions discard the remainder.

Attack base =
    2 * Level
  + floor(max(Strength - 8, 0) / 16)
  + floor(max(Agility - 20, 0) / 16)

Attack score = 5 * Attack base + weapon Attack

Defence score =
    5 * (Level + floor(Agility / 8))
  + weapon Defence

The game adds a separate random value from 0 to 99 to each score and compares the results. A sufficiently strong defender result causes a miss. Better attacker results improve the later damage multiplier.

Agility therefore affects both sides of melee combat, but more strongly on defence: attack gains one base step per 16 Agility points above 20, whereas defence receives floor(Agility / 8) before multiplication by five.

Damage

Before armour and hit-quality multipliers, normal champion damage is based on:

random value from 1 through the weapon Random damage field
+ Level
+ weapon Fixed damage
+ floor(max(Strength - 12, 0) / 8)

The special rear attack triples this intermediate result. Approximately half of the defender's effective armour is then subtracted. The quality of the opposed attack roll can leave the result unchanged or multiply it by two, three or four. A result reduced to zero by armour causes no damage.

Warpower

Warpower stores a spell magnitude, P, in the champion's active worn-spell byte. While it is active, combat uses:

effective Level    = Level + floor(P / 4) + 1
effective Strength = Strength + P + 8
effective Agility  = Agility + P

The extra 8 is the normal internal Strength bias used by the combat routine; Warpower's additional improvement over an unenchanted character is P to Strength, P to Agility, and floor(P / 4) + 1 to Level.

Warpower consequently improves attack score, defence score and the Strength contribution to damage. It does not change the weapon's four-byte modifier record and does not directly multiply final damage. Casting it costs 4 Vitality in the same way as launching another spell.

Agility and attack timing

Agility participates directly in attack and defence as described above. It also helps establish the champion's general action-speed reload value together with Level:

speed reload = max(8, 15 - floor(Agility / 16) - floor(Level / 2))

A lower reload means the action scheduler becomes ready sooner. This is separate from weapon selection: none of the sixteen melee weapon records contains a weight or speed field.

A physical attack also writes the same initial attack-cooldown value, 7, regardless of the selected weapon. There is therefore no confirmed dagger-fast/axe-slow attack delay in the weapon table.

Vitality cost

Loading a champion into a physical combat calculation removes 3 current Vitality, clamped at zero. In the usual champion-versus-monster attack this applies to the attacking champion. If both combatants are champions, each champion whose combat values are loaded pays the same 3-point cost.

The cost is independent of weapon type. Daggers, swords, axes and staffs do not have separate exertion or weight values. Spell launching uses a separate fixed cost of 4 Vitality before the spell is resolved.