-- What a character IS, as opposed to what they have: the player flag word, and staff invisibility.
--
-- The author, 20 August: "Fire away - do deny, wizinvis, holylight, and teleport, please." Three of
-- those four write something that has to survive a logout, and until now nothing did.
--
-- WHY THE WHOLE FLAG WORD RATHER THAN A `denied` COLUMN. `deny` is the command that needs this
-- today, and a boolean would do for it -- but PlrFlags already carries holylight, freeze, and a
-- dozen more that ROM saves in exactly one field. ROM writes `Act %s` and reads it back; adding a
-- column per flag as each command is ported would mean fifteen migrations to arrive somewhere this
-- one gets to now. See PlrFlags for the whole set.
--
-- THIS IS THE FIRST TIME PlrFlags HAS BEEN PERSISTED AT ALL, which is worth saying plainly: every
-- flag in that word has been resetting to zero on every logout since the field was written. Nothing
-- noticed because nothing set any of them.
--
-- AND IT MEANS holylight NOW STICKS. An immortal who turns it on and logs out comes back with it on.
-- That is ROM's behaviour -- PLR_HOLYLIGHT lives in ch->act and is saved with the rest -- and it is
-- the right one: it is a preference about how you see the world, not a spell.
--
-- INVIS LEVEL IS ITS OWN COLUMN because it is a NUMBER, not a bit. ROM stores it separately for the
-- same reason (`Invi %d` in save.c, beside `Act %s`), and the number is load-bearing: it is the
-- trust BELOW WHICH nobody can see you, so `wizinvis 60` and `wizinvis` mean different things to a
-- level 75. A flag could not say that.
--
-- ZERO IS THE RIGHT DEFAULT FOR BOTH, and for every row that already exists: nobody has any flags
-- set and nobody is invisible, because until this migration nothing could set either.

ALTER TABLE characters ADD COLUMN player_flags INTEGER NOT NULL DEFAULT 0;

-- 0 is visible. Otherwise the trust below which this character cannot be seen -- see
-- Visibility.CanSee, which has consulted it since the day it was written and has never had anything
-- to read.
ALTER TABLE characters ADD COLUMN invis_level INTEGER NOT NULL DEFAULT 0;
