✨ ARCANUM RUNE DIFFICULTY: Apprentice Creational

The Singleton

Ensuring only one Supreme Lich manages the central hospital database.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Abjuration // Soul-Locking
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
SINGLETON ; Singleton Pattern in MUMPS
; Managing access to the Supreme Lich.
;
GETLICH() ;
  L +^SUPREMELICH:5 I '$T Q "LICH IS BUSY WITH ANOTHER NECROMANCER"
  I $D(^SUPREMELICH)=0 D
  . S ^SUPREMELICH="AWAKENED"
  . S ^SUPREMELICH("POWER")=9001
  . W "The Supreme Lich is summoned for the first time.",!
  L -^SUPREMELICH
  Q "SUPREME_LICH_REF"
Runic Tags: #creational #singleton #mumps #necromancy