-- Alignment.
--
-- ROM's ch->alignment, written to the pfile as `Alig` (save.c) and running -1000 to 1000. The port
-- has modelled it since the rules layer was written -- Character.Alignment, with the good and evil
-- bands starting at +/-350 -- and has never once saved it. WeaponEffects drains it on every vampiric
-- strike (WeaponEffects.cs:108) and that drain was discarded at logout, so the only thing in the
-- game that moves alignment could not move it durably.
--
-- STARTING VALUE COMES FROM THE KINGDOM, per the author (10 August): Tier is good, Undermountain is
-- evil, Kael sits at zero. ROM asks the player instead -- "good, neutral or evil?" -- and assigns
-- 750 / 0 / -750 (comm.c:2636-2638). Act of War does not need to ask, because picking a kingdom has
-- already answered it, and the three numbers are ROM's own rather than new ones. KingdomTable holds
-- the mapping so nothing has to repeat it.
--
-- DEFAULT -32768 IS A SENTINEL, NOT AN ALIGNMENT, and it has to be one: unlike `side`, this column
-- has no spare value inside its own range. Zero is a perfectly good alignment -- it is exactly what
-- a Kael character starts at -- so defaulting to 0 would be indistinguishable from "neutral by
-- choice", and every pre-existing character of Tier and Undermountain would have been quietly
-- converted to neutral rather than backfilled. -32768 is far outside -1000..1000 and cannot be
-- confused with a real value.
--
-- The backfill is in C#, for the same reason 0003's was: it needs the character's kingdom, and for a
-- row written before 0003 the kingdom itself is still being derived from the race at load time. SQL
-- would have to resolve both in the right order using a copy of the race table. CharacterMapping
-- already resolves side first, so by the time alignment is read the kingdom is known.
ALTER TABLE characters ADD COLUMN alignment INTEGER NOT NULL DEFAULT -32768;
