the former's gifts turn good neutral instead of neutral.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5001 c06c8d41-db1a-0410-9941-cceddc491573
BC6CG2UUZWUUMWTHYYDMOSRRZ5DVQ367ZSNRGMEOB6GPCZN4NPDQC
5JS3QSE3EIXSBVI4DATH2EIFD7QN3POAFEUM7MK4NRMPH5JOPAAQC
P2OYYNPHIBGOLT4CRLNTTIXDN34EU2QCMFQJNLAMUAHQXZTEDPXQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
SWOYPTHJAWFEDBMB3ROT33VQZIXGZD5UOXEV456DDUENW2HGA66QC
CQ24AVAI6SW3AHTIDMLPSTRRBEU6FHRF5I5FD6G5QIYE6PO4BQMQC
4GOAJ76M52PYIX67SUMWWT7M6EKRNBAVTKMVMXYIZPZ5EZHIWO7QC
NLQNXH3SVJ52CWXEV35FSSZP32VHC4QFGN3HINF4KO5GZHZMOBKQC
GGDX26OLH2EBB2ZBJCBIE3UDPHWEMTMSOEJBJIWCBLUK3HEY3PKQC
FDMKFGCTWKKSBP3B5VE4BSVFHUVNX5BSDFRVD6E735DHPVYEQFGQC
}
// When abandoning the god in question, turn friendly god gifts good
// neutral. If seen, only count monsters where the player can see the
// change, and output a message.
static bool _make_god_gifts_on_level_good_neutral(bool seen = false)
{
int count = 0;
for ( int i = 0; i < MAX_MONSTERS; ++i )
{
monsters *monster = &menv[i];
if (monster->type != -1
&& monster->attitude == ATT_FRIENDLY
&& (monster->flags & MF_GOD_GIFT))
{
// monster changes attitude
monster->attitude = ATT_GOOD_NEUTRAL;
if (!seen || simple_monster_message(monster, " becomes indifferent."))
count++;
}
}
return (count);
static bool _god_gifts_good_neutral_wrapper()
{
return (_make_god_gifts_on_level_good_neutral());
}
// Make friendly god gifts turn good neutral on all levels, or on only
// the current one.
static bool _make_god_gifts_good_neutral(bool level_only)
{
bool success = _make_god_gifts_on_level_good_neutral(true);
if (level_only)
return (success);
return (apply_to_all_dungeons(_god_gifts_good_neutral_wrapper) || success);
}