significant events in morgue file, better event logging

This commit is contained in:
Llywelwyn 2023-08-25 22:43:50 +01:00
parent de5dacb2ba
commit 738484436b
38 changed files with 246 additions and 102 deletions

View file

@ -1,49 +0,0 @@
// --- GUI ---
pub const CHAR_CREATE_HEADER: &str = "Who are you? [Aa-Zz]";
pub const ANCESTRY_INFO_HEADER: &str = "Your ancestry grants...";
pub const CLASS_INFO_HEADER: &str = "Your class grants...";
// --- ANCESTRY RENDERABLES ---
pub const ELF_GLYPH: char = '@';
pub const ELF_COLOUR: (u8, u8, u8) = (0, 255, 0);
pub const DWARF_GLYPH: char = 'h';
pub const DWARF_COLOUR: (u8, u8, u8) = (255, 0, 0);
pub const CATFOLK_GLYPH: char = '@';
pub const CATFOLK_COLOUR: (u8, u8, u8) = (200, 200, 255);
// --- ANCESTRY BONUSES ---
pub const ELF_SPEED_BONUS: i32 = 1;
pub const ELF_TELEPATH_RANGE: i32 = 6;
pub const DWARF_DEFENCE_MOD: i32 = 1;
pub const CATFOLK_SPEED_BONUS: i32 = 2;
// --- ANCESTRY ATTRIBUTE MAXIMUMS ---
pub const TOTAL_ATTRIBUTE_POINTS_MAXIMUM: i32 = 75;
pub const HUMAN_MAX_ATTR: [i32; 6] = [19, 19, 19, 19, 19, 19];
pub const ELF_MAX_ATTR: [i32; 6] = [15, 18, 15, 20, 20, 18];
pub const DWARF_MAX_ATTR: [i32; 6] = [19, 17, 20, 16, 16, 16];
pub const GNOME_MAX_ATTR: [i32; 6] = [16, 18, 16, 20, 18, 18];
pub const CATFOLK_MAX_ATTR: [i32; 6] = [16, 20, 16, 16, 18, 20];
pub const UNKNOWN_MAX_ATTR: [i32; 6] = [18, 18, 18, 18, 18, 18];
// --- CLASS MIN ATTRIBUTES ---
pub const FIGHTER_MIN_ATTR: (i32, i32, i32, i32, i32, i32) = (10, 8, 10, 6, 6, 8);
pub const ROGUE_MIN_ATTR: (i32, i32, i32, i32, i32, i32) = (8, 10, 8, 6, 8, 10);
pub const WIZARD_MIN_ATTR: (i32, i32, i32, i32, i32, i32) = (6, 8, 6, 10, 10, 8);
pub const VILLAGER_MIN_ATTR: (i32, i32, i32, i32, i32, i32) = (6, 6, 6, 6, 6, 6);
// --- CLASS ATTRIBUTE IMPROVE CHANCES ---
pub const FIGHTER_IMPR_CHANCE: [i32; 6] = [30, 20, 30, 6, 7, 7];
pub const ROGUE_IMPR_CHANCE: [i32; 6] = [18, 30, 20, 9, 8, 15];
pub const WIZARD_IMPR_CHANCE: [i32; 6] = [10, 15, 20, 30, 15, 10];
pub const VILLAGER_IMPR_CHANCE: [i32; 6] = [15, 15, 25, 15, 15, 15];
// --- CLASS STARTING ITEMS --- ## If any of these are changed, update ancestry infotext in src/gui/character_creation.rs.
pub const FIGHTER_STARTING_FOOD: &str = "1d2+1";
pub const FIGHTER_STARTING_WEAPON: &str = "equip_shortsword";
pub const FIGHTER_STARTING_ARMOUR: &str = "equip_body_ringmail";
pub const FIGHTER_STARTING_SHIELD: &str = "equip_mediumshield";
pub const ROGUE_STARTING_FOOD: &str = "1d2+2";
pub const ROGUE_STARTING_WEAPON: &str = "equip_rapier";
pub const ROGUE_STARTING_ARMOUR: &str = "equip_body_weakleather";
pub const WIZARD_STARTING_FOOD: &str = "1d2+1";
pub const WIZARD_STARTING_WEAPON: &str = "equip_dagger";
pub const WIZARD_STARTING_ARMOUR: &str = "equip_back_protection";
pub const WIZARD_MAX_SCROLL_LVL: i32 = 3;
pub const WIZARD_SCROLL_AMOUNT: &str = "1d3";
pub const WIZARD_POTION_AMOUNT: &str = "1d3-1";
pub const VILLAGER_STARTING_FOOD: &str = "1d3+2";

View file

@ -1,12 +0,0 @@
pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities.
pub const CARRY_CAPACITY_PER_STRENGTH: i32 = 8; // How much weight can be carried per point of strength.
pub const NORMAL_SPEED: i32 = 12; // Normal speed for almost all entities.
pub const TURN_COST_MULTIPLIER: i32 = 4; // How many ticks for NORMAL_SPEED to get a turn.
pub const ATTR_BONUS_0: i32 = 10; // At this value, the attribute bonus is 0.
pub const ATTR_NEEDED_PER_POINT: i32 = 2; // How many points +- ATTR_BONUS_0 are needed per +- 1 bonus.
pub const STANDARD_HIT_DIE: i32 = 8; // Standard hit die used for rolling HP.
pub const STANDARD_HIT_DIE_0: i32 = 4; // Standard hit die used for rolling HP for level 0.
pub const STANDARD_MANA_DIE: i32 = 4; // Standard mana die used for rolling mana.
pub const MINIMUM_MANA: i32 = 0; // The minimum mana a monster can have.
pub const MINIMUM_MANA_PLAYER: i32 = 1; // The minimum mana a player can have.
pub const STANDARD_BAC: i32 = 10; // Standard BASE AC.

View file

@ -1,21 +0,0 @@
// DEFAULT THEME
#[allow(dead_code)]
pub const WALL_GLYPH: char = '#';
pub const FLOOR_GLYPH: char = '.';
pub const DOWN_STAIR_GLYPH: char = '>';
pub const UP_STAIR_GLYPH: char = '<';
pub const WOOD_FLOOR_GLYPH: char = '.';
pub const FENCE_GLYPH: char = '=';
pub const BRIDGE_GLYPH: char = '.';
pub const GRAVEL_GLYPH: char = ';';
pub const ROAD_GLYPH: char = '.';
pub const GRASS_GLYPH: char = '"';
pub const FOLIAGE_GLYPH: char = ':';
pub const HEAVY_FOLIAGE_GLYPH: char = ';';
pub const SAND_GLYPH: char = '.';
pub const SHALLOW_WATER_GLYPH: char = '~';
pub const DEEP_WATER_GLYPH: char = '≈';
pub const BARS_GLYPH: char = '#';
// FOREST THEME
pub const FOREST_WALL_GLYPH: char = '♣';

View file

@ -1,2 +0,0 @@
use std::error::Error;
use super::Config;

View file

@ -1,31 +0,0 @@
pub const NOCHARGES_WREST: &str = "You wrest one last charge from the worn-out wand.";
pub const NOCHARGES_DIDNOTHING: &str = "The wand does nothing.";
pub const IDENTIFY_ALL: &str = "You feel attuned to your belongings!";
pub const IDENTIFY_ALL_BLESSED: &str = "Divine favour reveals all";
pub const REMOVECURSE: &str = "You feel a weight lifted!";
pub const REMOVECURSE_BLESSED: &str = "You feel righteous";
pub const REMOVECURSE_BLESSED_FAILED: &str = "You feel righteous! But nothing happened.";
pub const DAMAGE_PLAYER_HIT: &str = "are hit!";
pub const DAMAGE_ITEM_HIT: &str = "is ruined!";
pub const DAMAGE_OTHER_HIT: &str = "is hit!";
pub const HEAL_PLAYER_HIT: &str = "recover some vigour.";
pub const HEAL_PLAYER_HIT_BLESSED: &str = "You feel great";
pub const HEAL_OTHER_HIT: &str = "is rejuvenated!";
pub const MAGICMAP: &str = "You recall your surroundings!";
pub const MAGICMAP_CURSED: &str = "... but forget where you last were";
pub const NUTRITION: &str = "You eat the";
pub const NUTRITION_CURSED: &str = "Blech! Rotten";
pub const NUTRITION_BLESSED: &str = "Delicious";
pub const LEVELUP_PLAYER: &str = "Welcome to experience level";
pub const YOU_PICKUP_ITEM: &str = "You pick up the";
pub const YOU_DROP_ITEM: &str = "You drop the";
pub const YOU_EQUIP_ITEM: &str = "You equip the";
pub const YOU_REMOVE_ITEM: &str = "You unequip your";
pub const YOU_REMOVE_ITEM_CURSED: &str = "You can't remove the";

View file

@ -1,10 +1,3 @@
pub mod entity;
pub mod visuals;
pub mod glyphs;
pub mod messages;
pub mod char_create;
mod load;
use rltk::prelude::*;
use toml::Value;
use serde::{ Serialize, Deserialize };

View file

@ -1,39 +0,0 @@
// POST-PROCESSING
pub const WITH_SCANLINES: bool = false; // Adds scanlines to the screen.
pub const WITH_SCREEN_BURN: bool = false; // Requires WITH_SCANLINES.
pub const WITH_DARKEN_BY_DISTANCE: bool = true; // If further away tiles should get darkened, instead of a harsh transition to non-visible.
pub const MAX_COLOUR_OFFSET_PERCENT: i32 = 30;
pub const WITH_SCANLINES_BRIGHTEN_AMOUNT: f32 = 0.1; // 0.0 = no brightening, 1.0 = full brightening.
pub const NON_VISIBLE_MULTIPLIER: f32 = 0.3; // 0.0 = black, 1.0 = full colour.
pub const NON_VISIBLE_MULTIPLIER_IF_SCANLINES: f32 = 0.8; // as above, but when using scanlines. should be higher.
pub const MAX_DARKENING: f32 = 0.45; // 0.0 = black, 1.0 = full colour - only used if WITH_DARKEN_BY_DISTANCE is true.
pub const MAX_DARKENING_IF_SCANLINES: f32 = 0.9; // as above, but when using scanlines. should be higher.
pub const START_DARKEN_AT_N_TILES: f32 = 8.0; // start darkening at this distance (should always be less than entity::DEFAULT_VIEWSHED_STANDARD).
pub const SHORT_PARTICLE_LIFETIME: f32 = 100.0; // in ms
pub const DEFAULT_PARTICLE_LIFETIME: f32 = 200.0;
pub const LONG_PARTICLE_LIFETIME: f32 = 300.0;
// THEMES
pub const BLOODSTAIN_COLOUR: (u8, u8, u8) = (153, 0, 0);
// DEFAULT THEME
pub const DEFAULT_BG_COLOUR: (u8, u8, u8) = (29, 50, 50);
pub const WALL_COLOUR: (u8, u8, u8) = (229, 191, 94);
pub const FLOOR_COLOUR: (u8, u8, u8) = (25, 204, 122);
pub const STAIR_COLOUR: (u8, u8, u8) = (200, 200, 0);
pub const WOOD_FLOOR_COLOUR: (u8, u8, u8) = (41, 30, 20);
pub const FENCE_FG_COLOUR: (u8, u8, u8) = (110, 24, 0);
pub const FENCE_COLOUR: (u8, u8, u8) = (45, 30, 10);
pub const BRIDGE_COLOUR: (u8, u8, u8) = (42, 48, 37);
pub const GRAVEL_COLOUR: (u8, u8, u8) = (26, 26, 53);
pub const ROAD_COLOUR: (u8, u8, u8) = (8, 38, 40);
pub const GRASS_COLOUR: (u8, u8, u8) = (9, 65, 6);
pub const FOLIAGE_COLOUR: (u8, u8, u8) = (5, 60, 5);
pub const HEAVY_FOLIAGE_COLOUR: (u8, u8, u8) = (5, 60, 5);
pub const SAND_COLOUR: (u8, u8, u8) = (70, 70, 21);
pub const SHALLOW_WATER_COLOUR: (u8, u8, u8) = (24, 47, 99);
pub const DEEP_WATER_COLOUR: (u8, u8, u8) = (18, 33, 63);
pub const BARS_COLOUR: (u8, u8, u8) = (100, 100, 100);
// FOREST THEME
pub const FOREST_WALL_COLOUR: (u8, u8, u8) = (0, 153, 0);