Skip to content

Commit 3c1fe46

Browse files
Maleclypsegithub-actions[bot]GuardianDll
authored
[ Xedra Evolved ] No Mana regen for the dead (#82375)
* No Mana for the dead Update mutations.json * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Xedra_Evolved/mutations/mutations.json * Apply suggestions from code review * Update data/mods/Xedra_Evolved/spells/vampire_spells.json * Update magic.cpp * Update data/mods/Xedra_Evolved/mutations/mutations.json * Astyle Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <[email protected]>
1 parent be9a915 commit 3c1fe46

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

data/mods/Xedra_Evolved/mutations/mutations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,8 @@
11781178
{ "value": "STAMINA_REGEN_MOD", "add": 0.5 },
11791179
{ "value": "METABOLISM", "multiply": -0.5 },
11801180
{ "value": "DISINFECTANT_BONUS", "multiply": -1 },
1181-
{ "value": "BANDAGE_BONUS", "multiply": -1 }
1181+
{ "value": "BANDAGE_BONUS", "multiply": -1 },
1182+
{ "value": "REGEN_MANA", "multiply": -50 }
11821183
]
11831184
},
11841185
{

src/magic.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,8 +2682,9 @@ void known_magic::update_mana( const Character &guy, float turns )
26822682
// mana should replenish in 8 hours.
26832683
const double full_replenish = to_turns<double>( 8_hours );
26842684
const double ratio = turns / full_replenish;
2685-
mod_mana( guy, std::floor( ratio * guy.calculate_by_enchantment( static_cast<double>( max_mana(
2686-
guy ) ), enchant_vals::mod::REGEN_MANA ) ) );
2685+
mod_mana( guy, std::floor( ratio * std::max( 0.0,
2686+
guy.calculate_by_enchantment( static_cast<double>( max_mana(
2687+
guy ) ), enchant_vals::mod::REGEN_MANA ) ) ) );
26872688
}
26882689

26892690
std::vector<spell_id> known_magic::spells() const

0 commit comments

Comments
 (0)