05oct09 CmdrZin

Death and Dying or Where do You Go when You're Gone?

Once a Player's Health is below 0, what happens? and what to do with all the monster parts that will clutter the halls?

Idea: If you get killed and there's no one to drag your body back to the staging area, you get to become a zombie. Well,
there will be a zombie named after your character that when it's killed, doesn't respawn.  

Respawn Control

Initial effort will be to record the Room (container) when the Zombie constructor is called. When the zombie is killed,
just treat it like a move command with the starting Room as the destination. Use the ManagedReference of the Room as
the thing stored. Use MudObject.addToInventory() and MudObject.removeFromInventory() as examples of code needed.
Had to use Door.commitCommand() as a reference on recovering an object from a reference.
Modify (see code)
Also make conteinerRef a protected variable to share with children.

Change containerRef from private to protected.

Add method respawn()
    Get current Room (Zombie's container), remove from Room's inventory, and add to spawnPoint's inventory.
    TODO: Make respawn a timed action.

Debug...can't record spawnPoint in constructor because Zombie hasn't been added to a Room yet..DOH.
Use a flag and trigger spawn point record on first action...Test Code working now.
Add another msg out to test comm...ok..can do multiple msgs.

TODO: Add Exp Points update to
TODO: Player respawn on death

Combat Adjustment

Give Players Attack:2, Damage:10, and Defense:2. Give Zombie Attack:1, Damage:5, Defense:1, and Health:10.
This will be hardcoded in the Test Code at the end of Zombie.doSomething()for now.