From 9f098d2782f0bec21a10305badc4f05d58261430 Mon Sep 17 00:00:00 2001 From: KorGgenT Date: Sat, 21 Sep 2019 03:38:42 -0400 Subject: [PATCH] move cost enchantment value --- src/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/player.cpp b/src/player.cpp index 1a9b55fa28aad..5fff139d3f3c3 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1677,8 +1677,9 @@ int player::run_cost( int base_cost, bool diag ) const if( move_mode == PMM_CROUCH ) { stamina_modifier *= 0.5; } - movecost /= stamina_modifier; + movecost = calculate_by_enchantment( movecost, enchantment::mod::MOVE_COST ); + movecost /= stamina_modifier; } if( diag ) { @@ -3568,6 +3569,7 @@ void player::update_body( const time_point &from, const time_point &to ) { update_stamina( to_turns( to - from ) ); update_stomach( from, to ); + recalculate_enchantment_cache(); if( ticks_between( from, to, 3_minutes ) > 0 ) { magic.update_mana( *this, to_turns( 3_minutes ) ); }