Magic
Magic is both physical and energy, this blueprint is how to do it.
Whiteboard
Magic on Dock 9 takes two forms: physical substance (rather the consistency and texture of silly putty), and energy in another object/room. Magic also is intended to move from physical to energy over time, as well as the energy is intended to move from its environment to objects, and objects to the environment. Pretty much everything with magic will, every 5 or 10 heartbeats, call the do_magic() function in the magical daemon, which
1) Determines what object type it is. NPC, player, room, item.
2) Determines the rules of magical dissipation for that object. (i.e. NPC magical energy goes to the room its in, while room energy goes to adjacent rooms and living things in the room). More magic equals faster spread.
3) Roll for a random chance for something crazy to happen to that thing. NPCs suddenly lose their inventory, players start saying everything backward, or teleport rooms for no real reason, rooms spawn odd little NPCs.
4) If magic levels are too high, living things may start to suffer health issues.
If a spell is intentionally being cast, it should turn the physical magic the living thing has into energy magic, which is then consumed by the spell.
The magic() function should return the magic value in a room - randomized a few percentage points up and down to keep things interesting.