From aff4bb50fb4bb663f22318f4be025c175d2c79bc Mon Sep 17 00:00:00 2001 From: PF Date: Sat, 9 Mar 2019 00:44:25 +0100 Subject: [PATCH] Balance and bugfix --- 1rl.py | 2 +- constants.py | 2 +- entity.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1rl.py b/1rl.py index 36bdd6b..4b64614 100644 --- a/1rl.py +++ b/1rl.py @@ -427,7 +427,7 @@ def main(): inheritance = out.get("inheritance") if inheritance: msglog.add_log("You upgraded your "+item.fego.value.get("name")+" "+item.fslot.value.get("name")+": it is already quite stable!", color_active=const.green, color_inactive=const.desat_green) - item.stability = max(item.stability, inheritance.stability) + item.stability = min(item.max_stability, max(item.stability, inheritance.stability)) render_inv = True turns.add_turn(player.time_malus + const.time_equip, const.TurnType.PLAYER, player) player.reset_time_malus() diff --git a/constants.py b/constants.py index dd4626f..eb142b8 100644 --- a/constants.py +++ b/constants.py @@ -102,7 +102,7 @@ class FeatureEgo(enum.Enum): m1 = {"name": "Sisyphean", "char": "m"} m2 = {"name": "Lovecraftian", "char": "m"} - m3 = {"name": "Elvish", "char": "m"} + m3 = {"name": "Tolkienesque", "char": "m"} class WeaponEgo(enum.Enum): c = {"name": "telepathic", "fego": [FeatureEgo.c1, FeatureEgo.c2, FeatureEgo.c3], "char": "t", "w_class": "ConsciousWeapon", "player_color": base3} diff --git a/entity.py b/entity.py index a692f14..3022ced 100644 --- a/entity.py +++ b/entity.py @@ -111,7 +111,7 @@ def attack(self, target, msglog, turns, passive=False): else: effective = self.is_effective_on(target.fslot) if effective: - dmg = random.randint(1, self.level + 2) + dmg = random.randint(1, 2*self.level) else: dmg = random.randint(1, self.level) target.hp -= dmg @@ -128,7 +128,7 @@ def effect_on_active(self, player): def describe(self): d = ["Weapons help you fight bugs.", "", "Each hit uses "+str(self.duration)+"s.", "Its hit probability is "+str(round(self.success_rate*100))+"%."] l = self.wego.value.get("fego") - d += ["", "Damage:","1d"+str(self.level+2)+" against "+l[0].value.get("name")+", "+l[1].value.get("name")+" and "+l[2].value.get("name")+" bugs.","1d"+str(self.level)+" against other bugs."] + d += ["", "Damage:","1d"+str(self.level*2)+" against "+l[0].value.get("name")+", "+l[1].value.get("name")+" and "+l[2].value.get("name")+" bugs.","1d"+str(self.level)+" against other bugs."] if self.wslot.value.get("instable"): d += ["", "It's a hack: fighting bugs decreases the stability!"]