publicstaticint[]AgeCycles={14400,28800,43200,57600,72000,80000};publicstaticstring[]age_humanoid=newstring[]{"a very young","a young","a middle-aged","an old","a very old","an ancient"};
Looks like 80k turns is the “beyond ancient” that this code is addressing:
if(ch.Age>=World.AgeCycles[5]&&ch.ImpLevel==Globals.eImpLevel.USER){intgrim;grim=Rules.RollD(1,100);// if character is lucky add to grim roll...if(grim<5){Rules.EnterUnderworld(ch);}
Keep in mind that at five seconds per turn, 80k turns is over 100 hours. Further keep in mind that back in the day it was ten seconds
per turn, at a minimum $6/hour. By the time your character was very old, you’d invested quite a bit of money in it.
@slowScenario: UnderworldEnabled True, ancient character eventually goes there
Given I use the "minimal" database
And I set "UnderworldEnabled" in the config file to "True"
And I add player and character "TestAncientDead01"
And I set the character's current age to "80001"
And the server is started
When I log on as "TestAncientDead01"
And I enter the game
Then within "50" turns I see a message "The world dissolves around you."
Main trouble here is that it’s possible to get a false negative: the character can get lucky for
50 consecutive turns and not get sent to the Underworld. Ditto false positives on the opposing
test (where we disable the Underworld). Any suggestions on how to handle this are certainly welcome.
Rest when dead with positive karma, in a map with no karma res point, if not a thief
#
Decided to also tackle a more complex case, which turned out to be more interesting than I had
wanted.
For this, we need a death other than burning (to avoid the Underworld cases we’ve already covered);
poison seems like a good one.
I added all of the database code necessary to add a Poisoned effect to the PlayerEffect table.
Nothing happens. Turns out that effect doesn’t actually get loaded from the database.
So then I try putting poison berries in the character’s hands, and causing the character to eat
them. Still nothing happens. I find that the in-hand item actually needs to be set to poisonous
there as well.
So I set the poison berries as actually poisonous in-hand, and make the character eat them. Still
nothing happens.
Long story short (too late), poison wasn’t fully implemented in this version of the
server code. Which is too bad, since there were some fairly interesting aspects of poison in the
original game (e.g. drinking wine would make the poison worse, but delay the effect, so you could
try to get to a healer).
Stubbornly insisting on the poison berry method, I applied a bit of a fix to the server code;
adding an actual poison effect when a character is poisoned:
Scenario: UnderworldEnabled True, positive karma non-thief corpse goes there if no karma res point
Given I use the "minimal" database
And I set "UnderworldEnabled" in the config file to "True"
And I remove the karma res point for map "0"
And I add player and character "TestBadCorpse03"
And I set the character's current karma to "1"
And I set the character's current HP to "1"
And I put poison berries in the the character's right hand
And I put poison berries in the the character's left hand
And the server is started
When I log on as "TestBadCorpse03"
And I enter the game
And I eat "berries"
And within "10" turns I see the message "You are dead"
And I rest
Then I saw a message "The world dissolves around you."
Well, things almost worked. I had never made a test Underworld map for the minimal database. In
most cases, the character would attempt to transport to the Underworld, be declared “out of
bounds”, and be sent back to the initial spawn point.
But in these latest cases, characters sent to the Underworld never even got the prompt back. Their
session was simply dead, so much that they weren’t even in the connected PCs list.
Rather than try to chase that down, I decided to finally make a test Underworld map. The necessary
location is hardcoded into the server:
// remove character from current location and place at Underworld entrancechr.CurrentCell=Cell.GetCell(chr.FacetID,Globals.UNDERWORLD_LANDID,Globals.PRAETOSEBA_MAPID,26,4,0);