Page 1 of 1

Deep dwarf guardian spirit shutoff

PostPosted: Wednesday, 13th July 2016, 18:07
by jwoodward48ss
I'm modding Crawl slightly, and one of the changes is that deep dwarves can regenerate (except in battle). I figured that a simple change of 3 to 2 in their innate mutations should do everything needed, but I'm finding a lot of references to deep dwarves in magic regeneration shutoffs when guardian spirit is active. Obviously, I want to fix that, but I can't find the actual piece of code that turns off mp regen when deep dwarves have guardian spirit. Where is it?

Re: Deep dwarf guardian spirit shutoff

PostPosted: Saturday, 8th October 2016, 15:02
by Rast
player.cc:

  Code:
bool player_regenerates_mp()
{
    // Don't let DD use guardian spirit for free HP, since their
    // damage shaving is enough. (due, dpeg)
    if (you.spirit_shield() && you.species == SP_DEEP_DWARF)
        return false;
    // Pakellas blocks MP regeneration.
    if (have_passive(passive_t::no_mp_regen) || player_under_penance(GOD_PAKELLAS))
        return false;
    return true;
}