From: Christian Heller Date: Sun, 15 Mar 2015 18:51:54 +0000 (+0100) Subject: 7DRL: New tool: fertilizer. X-Git-Url: https://plomlompom.com/repos/processes?a=commitdiff_plain;h=c23778327d92816c690a8e089bbe9c5bef9705ab;p=plomrogue 7DRL: New tool: fertilizer. --- diff --git a/confserver/world b/confserver/world index bab3d5a..898ccc6 100644 --- a/confserver/world +++ b/confserver/world @@ -48,7 +48,7 @@ TT_STORAGE 1 TT_PROLIFERATE 512 TT_ID 3 -TT_START_NUMBER 2 +TT_START_NUMBER 3 TT_LIFEPOINTS 54 TT_SYMBOL B TT_NAME BEAR @@ -78,13 +78,20 @@ TT_TOOLPOWER 5000 TT_START_NUMBER 0 TT_ID 7 +TT_TOOL fertilizer +TT_SYMBOL [ +TT_NAME 'FERTILIZER' +TT_START_NUMBER 0 +TT_TOOLPOWER 5000 + +TT_ID 8 TT_TOOL wood TT_START_NUMBER 0 TT_SYMBOL = TT_NAME WOOD -TT_ID 8 -TT_START_NUMBER 2 +TT_ID 9 +TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL $ TT_NAME 'BEAR CORPSE' @@ -92,7 +99,7 @@ TT_TOOLPOWER 4000 TT_PROLIFERATE 4096 TT_TOOL food -TT_ID 9 +TT_ID 10 TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL % @@ -100,7 +107,7 @@ TT_NAME 'HUMAN CORPSE' TT_TOOLPOWER 2500 TT_TOOL food -TT_ID 10 +TT_ID 11 TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL & @@ -108,7 +115,7 @@ TT_NAME 'DOG CORPSE' TT_TOOLPOWER 1500 TT_TOOL food -TT_ID 11 +TT_ID 12 TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL ( @@ -117,7 +124,7 @@ TT_TOOLPOWER 512 TT_PROLIFERATE 192 TT_TOOL food -TT_ID 12 +TT_ID 13 TT_START_NUMBER 0 TT_LIFEPOINTS 0 TT_SYMBOL ; @@ -125,7 +132,7 @@ TT_NAME 'BUG CORPSE' TT_TOOLPOWER 512 TT_TOOL food -TT_ID 13 +TT_ID 14 TT_START_NUMBER 64 TT_LIFEPOINTS 0 TT_SYMBOL '#' @@ -134,7 +141,7 @@ TT_TOOLPOWER 128 TT_PROLIFERATE 32 TT_TOOL food -TT_ID 14 +TT_ID 15 TT_START_NUMBER 3 TT_LIFEPOINTS 0 TT_SYMBOL * @@ -153,7 +160,8 @@ TT_CORPSE_ID 8 FAVOR_STAGE 0 SLIPPERS 4 -PLANT_0 14 -PLANT_1 11 -LUMBER 7 +PLANT_0 15 +PLANT_1 12 +LUMBER 8 TOOL_0 6 +TOOL_1 7 diff --git a/roguelike-server b/roguelike-server index 8cd7bb1..a88cfc0 100755 --- a/roguelike-server +++ b/roguelike-server @@ -1022,6 +1022,12 @@ def actor_use(t): log("You can't use a " # # + world_db["ThingTypes"][type_tool]["TT_NAME"] # # + " without some wood in your inventory.") # # + elif world_db["ThingTypes"][type]["TT_TOOL"] == "fertilizer": # # + pos = t["T_POSY"] * world_db["MAP_LENGTH"] + t["T_POSX"] + if world_db["MAP"][pos] == ord("."): + world_db["MAP"][pos] = ord(":") + else: + log("Can only fertilize on unfertilized earth.") elif world_db["ThingTypes"][type]["TT_TOOL"] == "food": t["T_CARRIES"].remove(id) del world_db["Things"][id] @@ -2060,6 +2066,7 @@ commands_db = { "PLANT_1": (1, False, specialtypesetter("PLANT_1")), # # "LUMBER": (1, False, specialtypesetter("LUMBER")), # # "TOOL_0": (1, False, specialtypesetter("TOOL_0")), # # + "TOOL_1": (1, False, specialtypesetter("TOOL_1")), # # "EMPATHY": (1, False, setter(None, "EMPATHY", 0, 1)), # # "TA_ID": (1, False, command_taid), "TA_EFFORT": (1, False, setter("ThingAction", "TA_EFFORT", 0, 255)), @@ -2115,6 +2122,7 @@ world_db = { "PLANT_1": 0, # # "LUMBER": 0, # # "TOOL_0": 0, # # + "TOOL_1": 0, # # "EMPATHY": 1, # # "ThingActions": {}, "ThingTypes": {}, @@ -2123,7 +2131,7 @@ world_db = { # 7DRL-specific! """Special type settings.""" -specials = ["SLIPPERS", "PLANT_0", "PLANT_1", "LUMBER", "TOOL_0"] # # +specials = ["SLIPPERS", "PLANT_0", "PLANT_1", "LUMBER", "TOOL_0", "TOOL_1"] # # """Mapping of direction names to internal direction chars.""" directions_db = {"east": "d", "south-east": "c", "south-west": "x", diff --git a/src/client/draw_wins.c b/src/client/draw_wins.c index 6555193..d40574d 100644 --- a/src/client/draw_wins.c +++ b/src/client/draw_wins.c @@ -481,7 +481,7 @@ extern void draw_win_map(struct Win * win) { // a = col_corpse; // } // - else if ('/' == c || ']' == c) // + else if ('/' == c || ']' == c || '[' == c) // { // a = col_tool; // } // diff --git a/test_server.sh b/test_server.sh index 94b360d..389e39e 100755 --- a/test_server.sh +++ b/test_server.sh @@ -27,5 +27,6 @@ echo "Server has quit. Here's the diff of final '_test' to reference save file" echo "./testing/ref_end (TEST WENT WELL IF NO LINES FOLLOW):" mv _test testing/last_end diff testing/last_end testing/ref_end +#echo 'NODIFF' rm record__test