1dff4f524b
FIX: KeyError when returning a mistyped spell with Levenshtein distance
Kwarde2024-01-18 17:03:21 +01:00
fc8bee2f73
Move MAX_LEVENSHTEIN_DISTANCE to game_config.py
Kwarde2024-01-18 16:57:32 +01:00
7cb65f5895
Better import usage, adds game_config.py, adds a debug mode (sets all spell chances to 100%)
Kwarde2024-01-18 16:43:20 +01:00
1485f171be
Make game.py compatible with the new dicts
Kwarde2024-01-18 16:31:43 +01:00
aea461499c
Make player.py compatible with wands and spells dicts
Kwarde2024-01-18 15:30:08 +01:00
7d28ac961c
Convert wands to dict
Kwarde2024-01-18 07:05:31 +01:00
c4bb8f7d80
Remove tmp.py: Used it for a quick testrun since I had a confusion with the new dictionary
Kwarde2024-01-17 16:52:00 +01:00
355eab297c
Make spells.py compatible with the new dictionary. Also: only import distance from Levenshtein if MAX_LEVENSHTEIN_DISTANCE > 0
Kwarde2024-01-17 16:50:38 +01:00
c138250c1c
FIX: Actually make spell dictionary. ('key': value) and not ('key', value)
Kwarde2024-01-17 16:14:04 +01:00
89318e7321
Convert spell objects to a dictionary
Kwarde2024-01-17 16:06:56 +01:00
fd8b6567f7
Cast spells if one of two player fails to cast their spell. Adds player.cast_spell(): Not scripted yet, currently just a placeholder so that cast_spell() prints somethin when called! (and modifies health)
Kwarde2024-01-15 15:36:37 +01:00
7f6ccb15ef
Get player spell from input (or show a help message)
Kwarde2024-01-15 15:11:13 +01:00
885f407383
Get player wands, intro to battle, adds spells.random_battle_spell()
Kwarde2024-01-15 14:56:20 +01:00
7cbcf4dbf4
Intro message, ask for player name, improve wand's representation (readability)
Kwarde2024-01-15 14:27:08 +01:00
b20532ae4a
Add methods and variables for running game
Kwarde2024-01-15 14:11:24 +01:00
5f1cdcfc7f
Implement Levenshtein.distance() in spells.find_spell_by_name()
Kwarde2024-01-15 13:40:34 +01:00
6a9e3b126a
Add decreased_spell_speed/damage to Player class and cast_spell_result()- used to print outcome message of a spell cast
Kwarde2024-01-15 13:31:26 +01:00