X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=plomrogue-server.py;h=4945462ca623565036ab8b9fe77954f6f4d83dc9;hb=b0aad316b388eab0428e5cc22bbac8cd9426c0e9;hp=0c82f05996e8bd6f6e0307305ea1b96323a59621;hpb=5797646d53448d99a5d6c0e031b16e8ee78a8edb;p=plomrogue diff --git a/plomrogue-server.py b/plomrogue-server.py index 0c82f05..4945462 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -86,7 +86,7 @@ def obey(command, prefix, replay=False, do_record=False): if do_record: record(command) save_world() - else: + elif 0 != len(tokens): print("Invalid command/argument, or bad number of tokens.") @@ -131,6 +131,8 @@ def save_world(): tt_string = tt_string + "TT_ID " + str(id) + "\n" + \ "TT_CONSUMABLE " + \ str(tt["TT_CONSUMABLE"]) + "\n" + \ + "TT_LIFEPOINTS " + \ + str(tt["TT_LIFEPOINTS"]) + "\n" + \ "TT_CORPSE_ID " + \ str(tt["TT_CORPSE_ID"]) + "\n" + \ "TT_PROLIFERATE " + \ @@ -374,6 +376,7 @@ def command_ttid(id_string): world_db["ThingTypes"][id] = { "TT_NAME": "(none)", "TT_CONSUMABLE": 0, + "TT_LIFEPOINTS": 0, "TT_PROLIFERATE": 0, "TT_START_NUMBER": 0, "TT_SYMBOL": "?", @@ -525,7 +528,9 @@ commands_db = { "TT_START_NUMBER": (1, False, ThingType_value_setter("TT_START_NUMBER", 0, 255)), "TT_PROLIFERATE": (1, False, ThingType_value_setter("TT_PROLIFERATE", - 0, 255)) + 0, 255)), + "TT_LIFEPOINTS": (1, False, ThingType_value_setter("TT_LIFEPOINTS", + 0, 255)) }