Skip to content

Commit

Permalink
Explicitly require manual abandon of Ru for Spiteful
Browse files Browse the repository at this point in the history
Also clean up some messaging
  • Loading branch information
Floodkiller committed Feb 17, 2020
1 parent b1f2826 commit 3c1e247
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crawl-ref/source/ability.cc
Expand Up @@ -3104,7 +3104,7 @@ static spret_type _do_ability(const ability_def& abil, bool fail)
case ABIL_RENOUNCE_RELIGION:
fail_check();
if (you.pledge == PLEDGE_SPITEFUL && you.piety < 160
&& you.religion == GOD_RU)
&& you.religion == GOD_RU && !you.attribute[ATTR_SPITEFUL])
{
mpr("Your pledge won't allow you to renounce Ru until you become Ru's champion.");
return SPRET_ABORT;
Expand All @@ -3122,7 +3122,7 @@ static spret_type _do_ability(const ability_def& abil, bool fail)
else
{
excommunication(true);
if (you.pledge == PLEDGE_SPITEFUL)
if (you.pledge == PLEDGE_SPITEFUL && !you.attribute[ATTR_SPITEFUL])
{
you.attribute[ATTR_SPITEFUL] = 1;
mpr("You accomplish your pledge, allowing you to freely roam the dungeon!");
Expand Down
6 changes: 6 additions & 0 deletions crawl-ref/source/god-prayer.cc
Expand Up @@ -78,6 +78,12 @@ static god_type _altar_identify_ecumenical_altar()

static bool _pray_ecumenical_altar()
{
if (you.pledge == PLEDGE_SPITEFUL && !you.attribute[ATTR_SPITEFUL])
{
mpr("You cannot worship a new god until you have abandoned Ru once before!");
return false;
}

if (yesno("You cannot tell which god this altar belongs to. Convert to "
"them anyway?", false, 'n'))
{
Expand Down
6 changes: 6 additions & 0 deletions crawl-ref/source/religion.cc
Expand Up @@ -3083,6 +3083,12 @@ bool player_can_join_god(god_type which_god)
if (you.species == SP_PROMETHEAN || you.pledge == PLEDGE_BRUTE_FORCE)
return false;

if (you.pledge == PLEDGE_SPITEFUL && !you.attribute[ATTR_SPITEFUL])
{
mpr("You cannot worship a new god until you have abandoned Ru once before!");
return false;
}

if (you.pledge == PLEDGE_CHAOS)
{
mpr("Nice try, Xom isn't letting you go that easily!");
Expand Down

0 comments on commit 3c1e247

Please sign in to comment.