# see the file NOTICE in the root directory of the PlomRogue source package.
+curses.init_pair(76, curses.COLOR_BLACK, curses.COLOR_WHITE)
curses.init_pair(77, curses.COLOR_WHITE, curses.COLOR_GREEN)
curses.init_pair(78, curses.COLOR_BLACK, curses.COLOR_RED)
curses.init_pair(79, curses.COLOR_WHITE, curses.COLOR_BLUE)
def win_bar(self):
winmap = []
for i in range(world_data[title]):
+ if i == 32:
+ break
winmap += [(symbol, curses.color_pair(color_number))]
winmap_size = [1, len(winmap)]
offset = [0, 0]
winmap = []
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
#curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
- #curses.init_pair(3, curses.COLOR_CYAN, curses.COLOR_BLACK)
+ curses.init_pair(3, curses.COLOR_CYAN, curses.COLOR_BLACK)
curses.init_pair(4, curses.COLOR_GREEN, curses.COLOR_BLACK)
curses.init_pair(5, curses.COLOR_YELLOW, curses.COLOR_BLACK)
curses.init_pair(6, curses.COLOR_RED, curses.COLOR_BLACK)
col_unknown = curses.color_pair(1)
col_creature = curses.color_pair(13)
col_player = curses.color_pair(8)
+ col_altar = curses.color_pair(3)
earth_colors = [
curses.color_pair(4),
curses.color_pair(5),
attribute = earth_colors[mapval]
if char == "&":
attribute = col_player
+ elif char == "$":
+ attribute = col_altar
if char in charmap:
char = charmap[char]
elif char == "@":
from client.config.world_data import world_data
+world_data["grace"] = 0
world_data["kidney"] = 0
world_data["stomach"] = 0
world_data["bowel"] = 0
io["worldstate_read_order"] += [["bladder", "int"]]
io["worldstate_read_order"] += [["wetmap", "map"]]
io["worldstate_read_order"] += [["soundmap", "map"]]
+io["worldstate_read_order"] += [["grace", "int"]]
from client.config.windows import windows_config
from client.windows import win_log
windows_config[:] = [
- {"config": [0, -34],
+ {"config": [0, -33],
"func": win_map,
"scroll_hints": False,
"title": "THE CRAWLING EATER"},
- {"config": [1, 33],
+ {"config": [1, 32],
"func": win_bar_maker(77, "%", "stomach"),
"scroll_hints": False,
"title": "stomach"},
- {"config": [1, 33],
+ {"config": [1, 32],
"func": win_bar_maker(79, "~", "kidney"),
"scroll_hints": False,
"title": "kidney"},
- {"config": [1, 33],
+ {"config": [1, 32],
"func": win_bar_maker(78, "%", "bowel"),
"scroll_hints": False,
"title": "bowel"},
- {"config": [1, 33],
+ {"config": [1, 32],
"func": win_bar_maker(80, "~", "bladder"),
"scroll_hints": False,
"title": "bladder"},
- {"config": [-8, 33],
+ {"config": [1, 32],
+ "func": win_bar_maker(76, "+", "grace"),
+ "scroll_hints": False,
+ "title": "grace"},
+ {"config": [-10, 32],
"func": win_log,
"scroll_hints": False,
"title": "log"}
t["T_POSX"] = move_result[2]
t["pos"] = move_result[1] * world_db["MAP_LENGTH"] + move_result[2]
world_db["soundmap"][t["pos"]] = ord("9")
+ if t == world_db["Things"][0] and world_db["MAP"][t["pos"]] == ord("$"):
+ world_db["MAP"][t["pos"]] = ord("0")
+ world_db["GRACE"] += 8
+ log("BOO!")
elif t == world_db["Things"][0]:
log("You try to MOVE there, but fail.")
t["T_MEMMAP"][t["pos"]] = ord("@")
log(message)
else:
- world_db["MAP"][t["pos"]] = ord("5")
+ if world_db["MAP"][t["pos"]] != ord("$"):
+ world_db["MAP"][t["pos"]] = ord("5")
world_db["HUMILITY"] = t["T_KIDNEY"] + t["T_BLADDER"] + \
(world_db["wetmap"][t["pos"]] - ord("0"))
world_db["wetmap"][t["pos"]] = 0
ord("0") == world_db["wetmap"][pos]:
world_db["wetmap"][pos] = ord("3")
i_water += 1
+ n_altars = 4
+ i_altars = 0
+ while (i_altars < n_altars):
+ y, x, pos = new_pos()
+ if ord("0") == world_db["MAP"][pos]:
+ world_db["MAP"][pos] = ord("$")
+ i_altars += 1
def calc_effort(ta, t):
height = -1
elif world_db["MAP"][pos] == ord("+"):
height = -2
+ elif world_db["MAP"][pos] == ord("$"):
+ height = -3
if height == -2 and wetness > 1 \
and 0 == rand.next() % ((2 ** 11) / (2 ** wetness)):
world_db["MAP"][pos] = ord("*")
io_db["worldstate_write_order"] += [["T_BLADDER", "player_int"]]
io_db["worldstate_write_order"] += [[write_wetmap, "func"]]
io_db["worldstate_write_order"] += [[write_soundmap, "func"]]
+io_db["worldstate_write_order"] += [["GRACE", "world_int"]]
import server.config.world_data
server.config.world_data.symbols_hide = "345"
-server.config.world_data.symbols_passable = "012-+*&"
+server.config.world_data.symbols_passable = "012-+*&$"
server.config.world_data.thing_defaults["T_STOMACH"] = 16
server.config.world_data.thing_defaults["T_BOWEL"] = 0
server.config.world_data.thing_defaults["T_KIDNEY"] = 16
world_db["NEW_SPAWN"] = 0
if not "HUMIDITY" in world_db:
world_db["HUMIDITY"] = 0
+if not "GRACE" in world_db:
+ world_db["GRACE"] = 0
io_db["hook_save"] = save_maps
import server.config.make_world_helpers
server.config.make_world_helpers.make_map = make_map
commands_db["pee"] = (0, False, play_pee)
commands_db["use"] = (1, False, lambda x: None)
commands_db["pickup"] = (0, False, lambda: None)
+commands_db["GRACE"] = (1, False, setter(None, "GRACE", 0, 255))
commands_db["NEW_SPAWN"] = (1, False, setter(None, "NEW_SPAWN", 0, 255))
commands_db["HUMIDITY"] = (1, False, setter(None, "HUMIDITY", 0, 65535))
commands_db["T_STOMACH"] = (1, False, setter("Thing", "T_STOMACH", 0, 255))