I suppose this is where I'll put assorted notes about this game now.
Bug: When calculating stats, the game writes Magic Def for harry three times - for each magical spell (excluding Flipendo, which uses defense); and then only applies the boost from equipment to the first value (defense against vermi). Quirrel seems to use both Vermillious and Verdimillious, so it's sorta relevant.
Damage = SpellBase + Strength - EnemyDefense/2
. SpellBase is 0 for enemies.
MagicDamage = ((MagicStr-EnemyMagicDef)/2 * SpellBase / 32) + SpellBase
. Each of the three magical spells have their own defenses.
Damage *= 2
. Chance to crit is 1/10 (game RNG)
FinalDamage = Damage + Rnd
, where Rnd is Rnd = Random(0, Damage/16) - Damage/8
, or if Damage/16 == 0
, Rnd=Random(0, 2) - 1
.
42
is used to signify the easter egg is active.
I have tentatively dumped all the scripts form this game here.