Skip to content
Snippets Groups Projects
Commit b9275c64 authored by Harry Wyatt's avatar Harry Wyatt
Browse files

Updated some language and remoed the probabilities from code

parent 5467a8d9
No related branches found
No related tags found
No related merge requests found
......@@ -332,8 +332,7 @@ def combat(enemy):
break
# now calculate the enemies attack
print("")
print("The " + enemy.name + " will now attack.")
print("\nThe " + enemy.name + " will now attack.")
enemy_attack_damage, critical = enemy.get_attack()
damage_to_do = int(max(player.apply_defense(enemy_attack_damage), 0))
......@@ -354,9 +353,6 @@ def combat(enemy):
else:
print("Could not recognise that command.")
def puzzle():
pass
def boss_battle():
game = MiniGame(game_map, game_info, random.randint(1, 3))
game.game_loop()
......@@ -409,7 +405,7 @@ def print_menu(exits, room_items, inv_items):
for item in room_items:
if item.can_pickup is True:
print("TAKE", item.id.upper(), "to take a", item.name + ".")
print("TAKE", item.id.upper(), "to take a(n)", item.name + ".")
elif item.on_interaction is not None:
# In this case, it's an item we must interact with in the game space as it cannot be picked up
print(f"INTERACT {item.id.upper()} {item.on_interaction_description}.")
......
......@@ -12,6 +12,8 @@ NEED_ITEM_PAIRING = 0.6 # 60% of chests will need a key or other to be ope
ALLOW_MULTICHESTS = False # Can one room have more than one chest in it?
CHANCE_NOTHING = 15 # The numbers of entries in the raffle that result in nothing being place into the chest
EXCLUDE_CHESTS = [spawn_room] # The rooms in which no chests can spawn - ever!
CHEST_NAMES = []
KEY_NAMES = []
# Item spawn probability file
PROBABILITIES_FILE = "probabilities.json"
......
......@@ -296,7 +296,7 @@ class GiantSword(Weapon):
def __init__(self, id):
super().__init__(
id,
name="a giant sword",
name="giant sword",
description="The swords barely fits in your hand. Surely a relic of a grand warrior",
attack=40,
dura=100,
......@@ -307,7 +307,7 @@ class WornDagger(Weapon):
def __init__(self, id):
super().__init__(
id,
name="a worn dagger",
name="worn dagger",
description="The blade of this thing has seen better days",
attack=20,
dura=25,
......@@ -318,7 +318,7 @@ class PlasticSpoon(Weapon):
def __init__(self, id):
super().__init__(
id,
name="a plastic spoon",
name="plastic spoon",
description="I don't think it'll have much use defending against monsters...",
attack=2,
dura=10,
......@@ -329,7 +329,7 @@ class GolfClub(Weapon):
def __init__(self, id):
super().__init__(
id,
name="a golf club",
name="golf club",
description="Turns out the people who lived here were avid golf players.",
attack=10,
dura=50,
......@@ -351,7 +351,7 @@ class Whip(Weapon):
def __init__(self, id):
super().__init__(
id,
name="a creaky whip",
name="creaky whip",
description="I don't want to know what this was used for... horses?",
attack=5,
dura=20,
......@@ -362,7 +362,7 @@ class Crocs(Defense):
def __init__(self, id):
super().__init__(
id,
name="a pair of crocs",
name="pair of crocs",
description="I doubt these will actually soften a blow. Yet their ugly style may distract the monsters",
defense=0.05,
dura=20,
......@@ -373,7 +373,7 @@ class SturdyShield(Defense):
def __init__(self, id):
super().__init__(
id,
name="a sturdy shield",
name="sturdy shield",
description="Seems like it can take a blow",
defense=0.25,
dura=100,
......@@ -384,7 +384,7 @@ class Apron(Defense):
def __init__(self, id):
super().__init__(
id,
name="a well used apron",
name="well used apron",
description="Covered in cooking stains. Clearly not cleaned all too well.",
defense=0.1,
dura=30,
......@@ -395,7 +395,7 @@ class SuitofArmour(Defense):
def __init__(self, id):
super().__init__(
id,
name="A pristine suit of armour",
name="pristine suit of armour",
description="Whoever owned this before took great care of it. It is still shiny!",
defense=0.6,
dura=150,
......@@ -406,7 +406,7 @@ class Cookies(HealthItem):
def __init__(self, id):
super().__init__(
id,
name="a pack of cookies",
name="pack of cookies",
description="Who cares how old these are? All I can think of is the taste of chocolate chip cookies!",
health=40,
)
......@@ -415,7 +415,7 @@ class FirstAidKit(HealthItem):
def __init__(self, id):
super().__init__(
id,
name='a first aid kit',
name='first aid kit',
description="This can heal any ailment at a whim!",
health=100,
)
......@@ -424,7 +424,7 @@ class Apple(HealthItem):
def __init__(self, id):
super().__init__(
id,
name="an apple",
name="apple",
description="An apple a day keeps the doctors away.",
health=20,
)
......@@ -433,7 +433,7 @@ class StrangePotion(Magic):
def __init__(self, id):
super().__init__(
id,
name="a strange potion",
name="strange potion",
description="A vile of unknown contents. Doesn't smell of anything.",
magic=20,
)
......@@ -442,92 +442,11 @@ class Wine(Magic):
def __init__(self, id):
super().__init__(
id,
name="a bottle of wine",
name="bottle of wine",
description="Bourgogne Pinot Noir 2003. Exquisite.",
magic=10,
)
spawn_chances = {
GiantSword: {
"CHEST": 4,
"dusty_bedroom": 0.1,
"observatory": 0.1
},
WornDagger: {
"CHEST": 5,
"ALL_ROOMS": 0.25,
"kitchen": 0.5
},
PlasticSpoon: {
"ALL_ROOMS": 0.3,
"CHEST": 1,
"spawn_room": 1.0
},
GolfClub: {
"garage": 1.0
},
Handgun: {
"dusty_bedroom": 0.3,
"CHEST": 4
},
Whip: {
"ALL_ROOMS": 0.1,
"CHEST": 3,
"dusty_bedroom": 0.3,
"garage": 0.3
},
Crocs: {
"spawn_room": 0.3,
"CHEST": 4,
"first_hallway": 0.5,
"dusty_bedroom": 0.4
},
SturdyShield: {
"first_hallway": 0.3,
"observatory": 0.25,
"CHEST": 5
},
Apron: {
"kitchen": 0.8,
"wine_cellar": 0.2,
"CHEST": 1
},
SuitofArmour: {
"high_tower": 0.1,
"basement": 0.1,
"garage": 0.1,
"CHEST": 5
},
Cookies: {
"high_tower": 0.1,
"basement": 0.1,
"garage": 0.1,
"CHEST": 5
},
FirstAidKit: {
"dusty_bedroom": 0.1,
"conservatory": 0.1,
"high_tower": 0.3,
"CHEST": 6
},
Apple: {
"ALL_ROOMS": 0.3,
"kitchen": 0.8
},
StrangePotion: {
"high_tower": 0.5,
"garden": 0.3,
"garage": 0.2,
"observatory": 0.2,
},
Wine: {
"conservatory": 0.2,
"wine_cellar": 0.9,
"kitchen": 0.2,
"CHEST": 4
},
}
spawnable_items = {
"weapons": [ GiantSword, WornDagger, PlasticSpoon, GolfClub, Handgun, Whip ],
"defense": [ Crocs, SturdyShield, Apron, SuitofArmour ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment