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
WTDOXPAB52K32FGR3Q5SFIR2UQLZ7KBJJW4WSYX5GUHZUY5NKEXAC
5PTCSQA4RA7CRCIFQQROQZUJHVNWCS33ZWCSGYSBXSJUAKGVCO4QC
}
}
}
static bool blessing_reinforcement(void)
{
bool success = false;
// Possible reinforcement.
const monster_type followers[] = {
MONS_ORC, MONS_ORC_WIZARD, MONS_ORC_PRIEST
};
int how_many = random2(4) + 1;
for (int i = 0; i < how_many; ++i)
{
monster_type follower_type =
followers[random2(ARRAYSIZE(followers))];
int monster = create_monster(follower_type, 0, BEH_GOD_GIFT,
you.x_pos, you.y_pos, you.pet_target,
MONS_PROGRAM_BUG);
if (monster != -1)
{
monsters *mon = &menv[monster];
mon->flags |= MF_ATT_CHANGE_ATTEMPT;
success = true;
// Possible promotions.
if (mon->type == MONS_ORC)
priest_type = MONS_ORC_PRIEST;
if (priest_type != MONS_PROGRAM_BUG)
{
// Turn an ordinary monster into a priestly monster, using a
// function normally used when going up an experience level.
// This is a hack, but there seems to be no better way for now.
mon->upgrade_type(priest_type, true, true);
return true;
}
return false;
}
}
static bool beogh_blessing_reinforcement(void)
{
bool success = false;
// Possible reinforcement.
const monster_type followers[] = {
MONS_ORC, MONS_ORC_WIZARD, MONS_ORC_PRIEST
};
int how_many = random2(4) + 1;
for (int i = 0; i < how_many; ++i)
{
monster_type follower_type =
followers[random2(ARRAYSIZE(followers))];
int monster = create_monster(follower_type, 0, BEH_GOD_GIFT,
you.x_pos, you.y_pos, you.pet_target,
MONS_PROGRAM_BUG);
if (monster != -1)
{
monsters *mon = &menv[monster];
mon->flags |= MF_ATT_CHANGE_ATTEMPT;
success = true;
}
}
return success;
}
static bool beogh_blessing_priesthood(monsters* mon)
{
monster_type priest_type = MONS_PROGRAM_BUG;
// Possible promotions.
if (mon->type == MONS_ORC)
priest_type = MONS_ORC_PRIEST;
if (priest_type != MONS_PROGRAM_BUG)
{
// Turn an ordinary monster into a priestly monster, using a
// function normally used when going up an experience level.
// This is a hack, but there seems to be no better way for now.
mon->upgrade_type(priest_type, true, true);
return true;
}
return false;