overmap travel - needs refactoring urgently, but it works for now

This commit is contained in:
Llywelwyn 2023-08-27 03:00:48 +01:00
parent 00dea1a55e
commit e1eae7efaf
15 changed files with 150 additions and 110 deletions

View file

@ -1,6 +1,10 @@
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 SPEED_MOD_BURDENED: f32 = 0.75;
pub const SPEED_MOD_STRAINED: f32 = 0.5;
pub const SPEED_MOD_OVERLOADED: f32 = 0.25;
pub const SPEED_MOD_OVERMAP_TRAVEL: f32 = 0.33;
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.

6
src/data/ids.rs Normal file
View file

@ -0,0 +1,6 @@
pub const ID_PREVIOUS_LEVEL: i32 = -5;
pub const ID_NEXT_LEVEL: i32 = -6;
pub const ID_OVERMAP: i32 = 1;
pub const ID_TOWN: i32 = 10;
pub const ID_TOWN2: i32 = ID_TOWN + 1;

View file

@ -3,3 +3,4 @@ pub mod visuals;
pub mod messages;
pub mod char_create;
pub mod events;
pub mod ids;

View file

@ -76,3 +76,9 @@ pub const IMPASSABLE_MOUNTAIN_GLYPH: char = '▲';
// FOREST THEME
pub const FOREST_WALL_GLYPH: char = '♣';
// Overmap/transition stuff
pub const TO_OVERMAP_GLYPH: char = '<';
pub const TO_OVERMAP_COLOUR: (u8, u8, u8) = (205, 127, 50);
pub const TO_TOWN_GLYPH: char = 'o';
pub const TO_TOWN_COLOUR: (u8, u8, u8) = (205, 127, 50);