Scenario: Mana restore potion restores mana fully
Given I use the "minimal" database as-is
And I add player and character "TestMR01"
And I make the character a thief
And I set the character's max mana to "10"
And I set the character's current mana to "5"
And I put a "Mana_Restore" potion in the character's left hand
And I start the server and play
And I wait for "1" turns
And I have a current mana of "5"
When I open and drink "bottle"
Then I have a current mana of "10"
Scenario: Naphtha is fatally poisonous at 50 HP
Given I use the "minimal" database as-is
And I add player and character "TestNaph01"
And I set the character's current and max HP to "50"
And I put a "Naphtha" potion in the character's left hand
And I start the server and play
When I open and drink "bottle"
Then after "2" turns I have a current HP of "35"
And after "3" turns I have a current HP of "22"
And after "3" turns I have a current HP of "10"
And within "3" turns I see the message "You have died from poison."
Interestingly, the character effect of drunk naphtha is transferred completely to the character’s
Poisoned attribute, so the poison will run its course completely independent of the duration that
was originally attached to the effect.
@slowScenario: Naphtha is severely poisonous at 80 HP
Given I use the "minimal" database as-is
And I add player and character "TestNaph02"
And I set the character's current and max HP to "80"
And I put a "Naphtha" potion in the character's left hand
And I start the server and play
When I open and drink "bottle"
Then after "2" turns I have a current HP of "65"
And after "3" turns I have a current HP of "52"
And after "3" turns I have a current HP of "40"
And after "3" turns I have a current HP of "29"
And after "3" turns I have a current HP of "19"
And after "3" turns I have a current HP of "10"
And after "3" turns I have a current HP of "2"
And within "2" turns I see the message "The Poison spell has worn off."
And after "3" turns I have a current HP of "3"
Scenario: Drinking orc urine is stunning
Given I use the "minimal" database as-is
And I add player and character "TestOrcB01"
And I put an "OrcBalm" potion in the character's left hand
And I start the server and play
When I open and drink "bottle"
Then I saw the message "You are stunned!"
And within "6" turns I no longer see the message "You are stunned!"
Because the length of the stun is random (between 1 and the effect amount), we just verify that it
stops within the maximum time.
Scenario: Stamina restore potion rests fully
Given I use the "minimal" database as-is
And I add player and character "TestSR01"
And I set the character's max stamina to "10"
And I set the character's current stamina to "0"
And I put a "Stamina_Restore" potion in the character's left hand
And I start the server and play
And I have a current stamina of "0"
When I open and drink "bottle"
Then I have a current stamina of "10"
And I rest
And I have a current stamina of "10"
With the the last couple of steps just to verify that the max stamina has not increased.
Both have no effect, intentionally (as far as I can tell). Water I can understand, but I remember
the use (and misuse) of wine in the original game; so I’ll call that a bug.
Wine (bought at the tavern) is a mild poison (does 1 hit of damage) that has a 10 round delay.
TODO: Poison delay is something I’ll have to look into a bit more. It was a big part of the poison
model of the original game, but doesn’t seem to be a feature of this server code.
Scenario: Youth potion restores youth
Given I use the "minimal" database as-is
And I add player and character "TestYP01"
And I set the character's current age to "75000"
And I put a "Youth_Potion" potion in the character's left hand
And I start the server and play
And I have an age of "ancient"
When I open and drink "bottle"
Then I saw the message "You feel young again!"
And I have an age of "young"
Scenario: Youth potion disappoints the young
Given I use the "minimal" database as-is
And I add player and character "TestYP02"
And I set the character's current age to "14000"
And I put a "Youth_Potion" potion in the character's left hand
And I start the server and play
And I have an age of "very young"
When I open and drink "bottle"
Then I saw the message "The fluid is extremely bitter."
And I have an age of "very young"
More simple stuff, with the negative test that the stat can’t be raised above to maximum for the
“Land” the player is in. Also, the permanent strength increase stuns the character for three turns,
and the dexterity increase blinds the character for three turns.
Scenario Outline: Permanent stat potion increases stat permanently
Given I use the "minimal" database as-is
And I add player and character "TestPS01"
And I set the character's "<stat>" stat to "<init>"
And I put a "<effect>" potion in the character's left hand
And I start the server and play
And I have a "<stat>" stat of "<init>"
When I open and drink "bottle"
And I have a "<stat>" stat of "<expect>"
Examples:
| stat | effect | init | expect || intelligence | Permanent_Intelligence | 10 | 11 || intelligence | Permanent_Intelligence | 18 | 18 || constitution | Permanent_Constitution | 10 | 12 || constitution | Permanent_Constitution | 18 | 18 || charisma | Permanent_Charisma | 10 | 11 || charisma | Permanent_Charisma | 18 | 18 |# TODO: Tests for effects for which there is not an item in the catalog.#| wisdom | Permanent_Wisdom | 10 | 11 |#| wisdom | Permanent_Wisdom | 18 | 18 |
Again, we make sure a stat is already at local max (18 in this case) does not increase.
Unfortunately, there are still a bunch of character effects to cover. We’ll finish them up quickly
so we can move on to something more interesting. Tomorrow.