-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpg.ufl
32 lines (29 loc) · 872 Bytes
/
rpg.ufl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
let player_health = 100
let player_inventory = []
let player_stats = {
strength: 10,
agility: 5,
intelligence: 3
}
say("Welcome to the RPG!")
say(Type 'help' for a list of commands.")
foreverloop {
say("Enter a command:")
let command = input()
ifthis command == "help" {
say("Available commands: explore, fight, inventory, use [item], stats, help")
}
orelse command == "stats" {
say("Health: " + player_health)
say("Strength: " + player_stats['strength'])
say("Agility: " + player_stats['agility'])
say("Intelligence: " + player_stats['intelligence'])
}
orelse command == "inventory" {
say("Inventory: " + player_inventory)
}
// Add more commands here
orelse {
say("Unknown command. Type 'help' for a list of commands.")
}
}