diff --git a/changelog.txt b/changelog.txt index 7669294..3f8a6e2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +2-September-2023 +- fixes: + - negative starting mana + - confusion/status effects only being run if mob turn aligned with turnclock turn + 30-August-2023 - added dungeon features: grassy forest room, and barracks variants (bunks, squads of mobtypes) - added support for map messages: i.e. notifications for present dungeon features logged to chat every now and again @@ -11,7 +16,7 @@ Pre-29-August-2023 - consistent chatlog colours: renderables for mobs, beatitude for items - dungeon features: framework - map identifiers (instead of displaying an incorrect depth) on ui: e.g. D1, D2, Town, Woods, etc. -- bugfixes: +- fixes: - map params are saved on map transition, instead of only at creation. now bloodstains, vision, etc. will persist when changing between floors - mob turns await an empty particle queue - no longer will they move mid-fireball animations - fixed traffic jams - 1. mobs will calc the best path to any tile within range of their target, instead of trying to path directly onto the target tile, and 2. if saved path is blocked to a waypoint, mobs will recalc a new path to the same point \ No newline at end of file diff --git a/src/gui/character_creation.rs b/src/gui/character_creation.rs index 5abf31d..947e4c8 100644 --- a/src/gui/character_creation.rs +++ b/src/gui/character_creation.rs @@ -1,6 +1,7 @@ use super::{ gamesystem::attr_bonus, gamesystem::get_attribute_rolls, + gamesystem::mana_at_level, Attributes, Pools, Renderable, @@ -352,6 +353,7 @@ pub fn setup_player_class(ecs: &mut World, class: Class, ancestry: Ancestry) { .expect("Unable to insert attributes component"); let mut pools = ecs.write_storage::(); + let starting_mp = mana_at_level(&mut rng, int, 1); pools .insert(player, Pools { hit_points: Pool { @@ -359,8 +361,8 @@ pub fn setup_player_class(ecs: &mut World, class: Class, ancestry: Ancestry) { max: entity::STANDARD_HIT_DIE + attr_bonus(con), }, mana: Pool { - current: 1 + attr_bonus(int), - max: entity::MINIMUM_MANA_PLAYER + attr_bonus(int), + current: starting_mp, + max: starting_mp, }, xp: 0, level: 1, diff --git a/wasm/rust-rl.js b/wasm/rust-rl.js index 7bba90b..57a6d6d 100644 --- a/wasm/rust-rl.js +++ b/wasm/rust-rl.js @@ -208,7 +208,7 @@ function makeMutClosure(arg0, arg1, dtor, f) { return real; } function __wbg_adapter_20(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he878b5719967bfcb(arg0, arg1); + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hae2c5f4c506a80cd(arg0, arg1); } function __wbg_adapter_23(arg0, arg1, arg2) { @@ -801,16 +801,16 @@ function __wbg_get_imports() { const ret = wasm.memory; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper699 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 124, __wbg_adapter_20); + imports.wbg.__wbindgen_closure_wrapper258 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 15, __wbg_adapter_20); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2754 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 522, __wbg_adapter_23); + imports.wbg.__wbindgen_closure_wrapper2910 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 549, __wbg_adapter_23); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2756 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 522, __wbg_adapter_23); + imports.wbg.__wbindgen_closure_wrapper2912 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 549, __wbg_adapter_23); return addHeapObject(ret); }; diff --git a/wasm/rust-rl_bg.wasm b/wasm/rust-rl_bg.wasm index 961a9ca..7803b71 100644 Binary files a/wasm/rust-rl_bg.wasm and b/wasm/rust-rl_bg.wasm differ