In which we burn some corpses. Mostly evil ones.
Test every day #
Continuing the UnderworldEnabled
work, with the next two situations where a character is sent to
the underworld:
- Your corpse is burned while you’re still online and with positive karma
- Your corpse is burned while you’re still online and of Evil alignment, and fail a constitution saving throw
So we need the character to be killed, and then have their corpse burn. Time to pull out an old
Kesmai mainstay, naphtha. In the game, it came in ceramic bottles and always ignited when the
bottle was thrown (I guess it’s assumed there is always a spark nearby to ignite it). The game also
didn’t care if you threw something along an unreasonable path, so throw bottle north south
is a
valid way to break a bottle at your feet.
|
|
Nothing too interesting here, and it works. As always, there is the negative test as well (where
UnderworldEnabled
is false). For the “You’re evil and you fail a constitution throw” case, I
set the character’s constitution to 1 to guarantee failure.
42 scenarios (42 passed)
338 steps (338 passed)
12m58.058s
Tackle a TODO every other day #
# TODO - verify combat damage in-game?
To verify the display of combat damage in the game itself, we’ll need to set up some actual combat. Since I don’t intend to abuse the innocent Test Dog, let’s spawn in some wolves.
|
|
As usual, the work involved was more research than code. Using wolves was a bit of a cheat, since the spawn will actually be “3 wolves”, identified as such until they are in the same cell as the player; then the display changes to three “wolf” lines, and my “wait for wolf” code is satisfied. I did get to simplify the database push a bit by writing this little piece of code:
|
|
As long as my hashes represent all required values, I can use that to convert them to SQL INSERT statements. I’m sure it’ll get a little more complicated over time, but it sufficed from the spawn zone entry.
And I can even refactor all of the existing database code to use this method.
Tomorrow.
Useful Stuff #
- Spoiler: Erlang chat server example