📚 SMALLTALK SEANCE DIFFICULTY: Adept Behavioral

State: Smalltalk

Allow a phantom to completely alter its reactions based on its emotional state.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: State
ARCANUM SCHOOL: Transmutation // Phase Shifting
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SMALLTALK PATTERN //
Object subclass: #PhantomEntity
  instanceVariableNames: 'emotionalState'
  classVariableNames: ''
  package: 'Tekromancy-Seance'.

PhantomEntity >> interact [
    emotionalState interactWith: self
]

PhantomEntity >> beVengeful [ emotionalState := VengefulState new ]

When a spirit shifts from Docile to Vengeful, it is as if the object changes its class entirely.

Runic Tags: #smalltalk #behavioral #seance