Anonymous user
RCRPG/Nim: Difference between revisions
no edit summary
(Created page with "{{collection|RCRPG}} This Nim version proposes the following commands: – alias <alias name> <command>: define an alias. – aliases: list aliases. – attack <direction>:...") |
No edit summary |
||
Line 4:
– alias <alias name> <command>: define an alias.
– aliases: list aliases.
– attack <direction>: use sledge to dig a tunnel in the given direction.
– drop all | <item>: drop all items or a specified item.
– east: move to East.
– equip <item>: equip an item present in inventory.
– help: display the list of commands and directions.
– inventory: list items in the inventory.
– look: display location, items and exits.
– name <name>: give a name to the current room.
– north: move to North.
– south: move to South.
– quit: quit game.
– take all | <item>: take all items or a specified item.
– unequip: unequip the equipped item.
– west: move to West.
Directions are: north, east, south, west, up, down.
==Code==
Line 57 ⟶ 75:
# Command names and number of tokens required for this command.
Commands =
StartRoomPos: Position = (0, 0, 0)
Line 69 ⟶ 87:
# Miscellaneous.
func nextPos(
## Compute new coordinates from current position and direction.
(
#___________________________________________________________________________________________________
Line 169 ⟶ 187:
items: @[gold, gold, gold, gold, gold])
# Create room names.
result.roomNames =
# Create aliases.
result.aliases =
#___________________________________________________________________________________________________
|