Share your repls and programming experiences

← Back to all posts
Goblin Ambush!
h
PatrickShouse (5)

A band of Goblins has been harassing travelers on the road to Frostpine Village. As a newly commissioned Paladin seeking glory, you, Kriv Delmirev, volunteered to hunt them down. You've tracked them to a clearing just outside the village. Gripping your trusty longsword you cautiously step forward . . .

How to Play

This REPL is text RPG combat simulation with virtual dice rolls and turn-based mechanics. The scenario starts with a perception check for our hero (Kriv Delmirev) the player character.

You can see to results of the roll in parens:
(4, [3] + 1)
The number in the brackets (in this case 3) indicates what you actually rolled. The number after the plus (in this case 1) indicates any bonus that apply to the situation. Lastly, the first number (in this case 4) is the total. This total is compared agains the Goblins stealth score (which is rolled in secret). If your score fails to match or exceed their stealth score, you fail the perception check.

If you fail the perception check, you are surprised by the ambush and are unable to act in the first round of combat.

The perception check is followed by a dexterity check which determines your initiative score. This score determines the order in which combat proceeds. The entity with the highest initiative goes first, follow by the next highest, and so on until all the entities in the combat have taken a turn. Once all turns have been played, the first round ends and the second round begins once again at the top of the initiative order. Combat continues until the player character dies, or all the Goblins are defeated.

When combat begins, a map is displayed.

This is a two dimension top-down view of the battle. Each entity's location is shown by the first letter. A dot '.' indicates an empty space.

The numbers across the top and left side can be used to determine coordinates for things on the map. The top row (0123456789) indicates x-coordinates and the first column, indicates y-coordinates. For example, Kriv is located at (x=0, y=0). Likewise, one of the Goblins whose name starts with M is located at (x=2, y=0).

Comments
hotnewtop
IntellectualGuy (648)

I'm having an error, it says on line 76, the list index is out of range.

PatrickShouse (5)

@IntellectualGuy Sounds like you found a bug. Can you post the whole error message including the stack trace, if you still have it? Does it work if you restart it?