frandallfarmer / neohabitat

Repository for the NeoClassical Habitat Server Project
http://neohabitat.org
MIT License
230 stars 42 forks source link

Implements Curses #287

Closed TheCarlSaganExpress closed 6 years ago

TheCarlSaganExpress commented 6 years ago

Curses are now in Habitat again!

No, not the expletive kind of curses, but rather the call in sick and watch daytime TV kind.

Curses temporarily modify the appearance of your Avatar. If you have a curse, you cannot remove your Avatar's head until the curse is lifted. To get rid of the curse you must pass it on to another Avatar. Once cured, you become immune to receiving any future curses. If the server resets then you become susceptible to receiving curses again.

Something important to note is that I decided to add a new argument called "true_head" to Head.java. This allows us to determine the true style of a head at all times, instead of relying on the "true_head_style" variable in Avatar.java to retrieve the true style of a head.

Curses https://github.com/Museum-of-Art-and-Digital-Entertainment/habitat/blob/master/chip/habitat/tape1/curses.pl1 https://github.com/Museum-of-Art-and-Digital-Entertainment/habitat/blob/master/chip/habitat/tape1/class_avatar.pl1

Adjacent method https://github.com/Museum-of-Art-and-Digital-Entertainment/habitat/blob/master/chip/habitat/muddle/width.pl1

frandallfarmer commented 6 years ago

Curses require a complete implementation of "touch" to be passed on: Specifically, neohabitat doesn't yet implement the adjacency check. I'm willing to accept a less precise check, but it should still be accurate.

If you don't want to have to check every single object's interaction with adjacency, I'd be happy for you to put something inline in the "touch" code.

Otherwise, people can't "run" from being touched, which was part of the fun!