In which we find out how hard it is to get a cool ring.
Give me the Ring #
So we still need to test this RequireMakeRecallReagent
option. For the negative case, we start
with:
|
|
for which we need to add a bunch of stuff. Updating a player class/alignment/etc, adding a spell to
a player’s repertoire, casting a spell, and checking our hands. We add the spells back into the
minimal
database rather than having to create them from scratch, and instrument everything up to
the casting of the spell…
but it doesn’t work.
And I cast the spell "makerecall" # features/steps/character_steps.rb:7
Sending na na na na and waiting for / ->/...
...
\e[1;32mR undefined\e[0m\e[24;1H
\e[24;1H \e[1;32mL undefined\e[0m\e[23;42H \e[23;30H\e[35mHits : 36/36
\e[0m\e[23;72H \e[23;60H\e[35mHits Taken : 0\e[0m\e[25;42H \e[25;30H\e[35mStamina : 10
\e[0m\e[24;42H \e[24;30H\e[35mExperience : 4996 \e[0m\e[11;1HI don't understand your command.
(Yes, I still need to work on better output of the terminal control codes.)
Hmmm. “na na na na” is the chant I set for the spell, but I’m getting a bad command response. Let’s make sure chanting works at all by trying to summon a demon:
Sending alsi ku nushi ilani and waiting for / ->/...
...
\e[0m\e[11;1HYou hear a voice in your head: 'Not now i'm busy.'\n\r\e[21;1H ->
So that worked.
Check the book #
The database looks correct to me, so we’ll try the one way that players can check the spells available: we’ll put his spellbook in his hand and look at it.
|
|
And the book doesn’t even show up in his hands. Turns out I was deleting the player out from under myself as part of the log on step:
|
|
|
|
Oops.
Instead, let’s switch to a less scorched earth model.
|
|
|
|
A little awkward and subject to further refactoring, but it should do what we want.
Great success! #
After learning a few things, like:
- An item can’t have a created-on date of NULL, or the server will choke on it.
- A player can only read a spellbook that is “attuned” to them. Otherwise it’s glued shut.
- The parser’s not quite up to “look at ring in left hand”; “look in left hand” works.
Ultimately I don’t need the spellbook code, but left it in as a cool in-game verification for the spell.
...
R spellbook L
Hits : 36/36 Hits Taken : 0 Stamina : 10 Experience : 4996 Magic Points: 10
->
And I read the book # features/steps/character_steps.rb:17
Sending read book and waiting for / ->/...
...
R spellbook L
Hits : 36/36 Hits Taken : 0 Stamina : 10 Experience : 4996 Magic Points: 10
Page 1:
The incantation for Make Recall (makerecall)
na na na na
->
And I warm the spell "Make Recall" # features/steps/character_steps.rb:12
Sending na na na na and waiting for / ->/...
...
R spellbook L
Hits : 36/36 Hits Taken : 0 Stamina : 10 Experience : 4996 Magic Points: 10
You warm the spell Make Recall.
->
And I cast the warmed spell # features/steps/character_steps.rb:22
Sending cast and waiting for / ->/...
...
R spellbook L ring
Hits : 36/36 Hits Taken : 0 Stamina : 10 Experience : 4996 Magic Points: 4
->
Then I have a recall ring in my left hand # features/steps/character_steps.rb:26
Sending look in left hand and waiting for / ->/...
...
R spellbook L ring
Hits : 36/36 Hits Taken : 0 Stamina : 10 Experience : 4996 Magic Points: 4
You are looking at a small gold ring. It is emitting a faint blue glow. The ring is worth 150 coins.
->
The above is heavily edited. Need to work on that ouput formatting. Tomorrow.
Useful Interesting Stuff
#