NAME 'Info'
BREAK 2
WIDTH -38
-HEIGHT 1
+HEIGHT 2
WINDOW l
NAME 'Log'
NAME 'Map'
BREAK 0
WIDTH -38
-HEIGHT -2
+HEIGHT -3
KEY 97 ai
KEY 112 pick
KEY 58 wait
type_id = world_db["Things"][id]["T_TYPE"]
name = world_db["ThingTypes"][type_id]["TT_NAME"]
inventory = inventory + name + "\n"
- string = str(world_db["TURN"]) + "\n" + \
+ ## 7DRL additions: GOD_MOOD, GOD_FAVOR
+ string = str(world_db["GOD_MOOD"]) + "\n" + \
+ str(world_db["GOD_FAVOR"]) + "\n" + \
+ str(world_db["TURN"]) + "\n" + \
str(world_db["Things"][0]["T_LIFEPOINTS"]) + "\n" + \
str(world_db["Things"][0]["T_SATIATION"]) + "\n" + \
inventory + "%\n" + \
dir_to_target = 0
return dir_to_target
+ def FOO():
+ libpr.dijkstra_map()
+
dir_to_target = False
mem_depth_c = b' '
run_i = 9 + 1 if "s" == filter else 1
init_score_map()
mem_depth_c = b'9' if b' ' == mem_depth_c \
else bytes([mem_depth_c[0] - 1])
- if libpr.dijkstra_map():
+ if FOO(): # libpr.dijkstra_map():
raise RuntimeError("No score map allocated for dijkstra_map().")
dir_to_target = get_dir_from_neighbors()
libpr.free_score_map()
"SEED_MAP": (1, False, command_seedmap),
"SEED_RANDOMNESS": (1, False, command_seedrandomness),
"TURN": (1, False, setter(None, "TURN", 0, 65535)),
+ "GOD_MOOD": (1, False, setter(None, "GOD_MOOD", -32768, 32767)), ##
+ "GOD_FAVOR": (1, False, setter(None, "GOD_FAVOR", -32768, 32767)), ##
"PLAYER_TYPE": (1, False, setter(None, "PLAYER_TYPE", 0)),
"MAP_LENGTH": (1, False, command_maplength),
"WORLD_ACTIVE": (1, False, command_worldactive),
"SEED_MAP": 0,
"PLAYER_TYPE": 0,
"WORLD_ACTIVE": 0,
+ "GOD_MOOD": 0, ##
+ "GOD_FAVOR": 0, ##
"ThingActions": {},
"ThingTypes": {},
"Things": {}
char * dsc_turn = "Turn: ";
char * dsc_hitpoints = "\nHitpoints: ";
char * dsc_satiation = "\nSatiation: ";
- uint16_t maxl = strlen(dsc_turn) + 5 + strlen(dsc_hitpoints)
- + strlen(dsc_satiation) + 6 + 3;
+ char * dsc_godsmood = "\nGod's mood: "; // 7DRL
+ char * dsc_godsfavor = "\nGod's favor: "; // 7DRL
+ uint16_t maxl = strlen(dsc_turn) + 5 + strlen(dsc_hitpoints) + 3 //
+ + strlen(dsc_satiation) + 6 + strlen(dsc_godsmood) + 6 //
+ + strlen(dsc_godsfavor) + 6; //
char * text = try_malloc(maxl + 1, __func__);
- int test = sprintf(text, "%s%d%s%d%s%d", dsc_turn, world.turn, dsc_hitpoints,
- world.player_lifepoints, dsc_satiation,
- world.player_satiation);
+ int test = sprintf(text, "%s%d%s%d%s%d%s%d%s%d", dsc_turn, world.turn,
+ dsc_hitpoints, world.player_lifepoints, dsc_satiation,
+ world.player_satiation, dsc_godsmood, world.godsmood, //
+ dsc_godsfavor, world.godsfavor); //
exit_trouble(test < 0, __func__, "sprintf");
add_text_with_linebreaks(win, text);
free(text);
}
uint32_t linemax = textfile_width(file);
char * read_buf = try_malloc(linemax + 1, __func__);
+ world.godsmood = (int16_t) read_value_from_line(read_buf, linemax, file); //
+ world.godsfavor = (int16_t) read_value_from_line(read_buf, linemax, file); //
world.turn = (uint16_t) read_value_from_line(read_buf, linemax, file);
world.player_lifepoints = (uint16_t) read_value_from_line(read_buf, linemax,
file);
struct yx_uint8 look_pos; /* coordinates of look cursor */
uint16_t turn; /* world/game turn */
int16_t player_satiation; /* player's belly fullness */
+ int16_t godsmood; /* island god's mood */ // 7DRL
+ int16_t godsfavor; /* island god's favor to player */ // 7DRL
uint8_t player_inventory_select; /* index of selected item in inventory */
uint8_t player_lifepoints; /* how alive the player is */
uint8_t winch; /* if set, SIGWINCH was registered; trigger reset_windows()*/