Pre-combat-refactor: current state with PvP sync, boss setup scripts, combat fixes

This commit is contained in:
Joan
2026-02-25 12:00:06 +01:00
parent bd27404941
commit 540df02ae7
11 changed files with 1825 additions and 5 deletions

26
add_boss.py Normal file
View File

@@ -0,0 +1,26 @@
import json
with open('gamedata/npcs.json', 'r') as f:
data = json.load(f)
if 'test_boss' not in data['npcs']:
data['npcs']['test_boss'] = {
'name': {'en': 'Level 50 Test Boss', 'es': 'Jefe de Prueba Nivel 50'},
'description': {'en': 'A huge terrifying monster.', 'es': 'Un monstruo enorme y aterrador.'},
'emoji': '👹',
'hp_min': 1000,
'hp_max': 1500,
'damage_min': 25,
'damage_max': 45,
'defense': 15,
'xp_reward': 500,
'loot_table': [],
'flee_chance": 0.0,
'status_inflict_chance': 0.5,
'death_message': {'en': 'The boss is defeated.', 'es': 'El jefe ha sido derrotado.'}
}
with open('gamedata/npcs.json', 'w') as f:
json.dump(data, f, indent=2)
print("Boss added.")
else:
print("Boss exists.")