git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@609 c06c8d41-db1a-0410-9941-cceddc491573
JW2KRJHES33W7UTWZ6NDO4TLMK4EFU4HKZXBWR2UJOMPCCOTR4CQC };const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] ={// no god{ "", "", "", "", "" },// Zin{ "repel the undead","call upon Zin for minor healing","call down a plague","utter a Holy Word","summon a guardian angel" },// TSO{ "repel the undead","smite your foes","dispel the undead","hurl bolts of divine anger","summon a divine warrior" },// Kikubaaqudgha{ "recall your undead slaves","Kikubaaqudgha is protecting you from some side-effects of death magic.","permanently enslave the undead","","summon an emissary of Death" },// Yredelemnul{ "animate corpses","recall your undead slaves","animate legions of the dead","drain ambient lifeforce","control the undead" },// Xom{ "", "", "","", "" },// Vehumet{ "gain power from killing in Vehumet's name","You can call upon Vehumet to aid your destructive magics with prayer.","During prayer you have some protection from summoned creatures.","", "" },// Okawaru{ "give your body great, but temporary strength","call upon Okawaru for minor healing","","","haste yourself" },// Makhleb{ "gain power from killing in Makhleb's name","harness Makhleb's destructive might","summon a lesser servant of Makhleb","hurl Makhleb's greater destruction","summon a greater servant of Makhleb" },// Sif Muna{ "tap ambient magical fields","freely open your mind to new spells","","Sif Muna is protecting you from some side-effects of spellcasting.","" },// Trog{ "go berserk at will","give your body great, but temporary, strength","","haste yourself","" },// Nemelex{ "", "", "","", "" },// Elyvilon{ "call upon Elyvilon for minor healing","call upon Elyvilon for purification","call upon Elyvilon for moderate healing","call upon Elyvilon to restore your abilities","call upon Elyvilon for incredible healing" }};const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] ={// no god{ "", "", "", "", "" },// Zin{ "repel the undead","call upon Zin for minor healing","call down a plague","utter a Holy Word","summon a guardian angel" },// TSO{ "repel the undead","smite your foes","dispel the undead","hurl bolts of divine anger","summon a divine warrior" },// Kikubaaqudgha{ "recall your undead slaves","Kikubaaqudgha is no longer shielding you from miscast death magic.","permanently enslave the undead","","summon an emissary of Death" },// Yredelemnul{ "animate corpses","recall your undead slaves","animate legions of the dead","drain ambient lifeforce","control the undead" },// Xom{ "", "", "","", "" },// Vehumet{ "gain power from killing in Vehumet's name","Vehumet will no longer aid your destructive magics.","Vehumet will no longer shield you from summoned creatures.","","" },// Okawaru{ "give your body great, but temporary strength","call upon Okawaru for minor healing","","","haste yourself" },// Makhleb{ "gain power from killing in Makhleb's name","harness Makhleb's destructive might","summon a lesser servant of Makhleb","hurl Makhleb's greater destruction","summon a greater servant of Makhleb" },// Sif Muna{ "tap ambient magical fields","forget spells at will","","Sif Muna is no longer protecting you from miscast magic.","" },// Trog{ "go berserk at will","give your body great, but temporary, strength","","haste yourself","" },// Nemelex{ "", "", "","", "" },// Elyvilon{ "call upon Elyvilon for minor healing","call upon Elyvilon for purification","call upon Elyvilon for moderate healing","call upon Elyvilon to restore your abilities","call upon Elyvilon for incredible healing" }
if (you.piety >= 30 && old_piety < 30){take_note(Note(NOTE_GOD_POWER, you.religion, 0));switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:break;default:strcpy(info, "You can now ");strcat(info,(you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE)? "repel the undead" :(you.religion == GOD_SIF_MUNA)? "tap ambient magical fields" :(you.religion == GOD_KIKUBAAQUDGHA)? "recall your undead slaves" :(you.religion == GOD_YREDELEMNUL)? "animate corpses" :(you.religion == GOD_VEHUMET)? "gain power from killing in Vehumet's name" :(you.religion == GOD_MAKHLEB)? "gain power from killing in Makhleb's name" :(you.religion == GOD_OKAWARU)? "give your body great, but temporary strength" :(you.religion == GOD_TROG)? "go berserk at will" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for minor healing"// Unknown god: "endure this program bug @30");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety >= 50 && old_piety < 50){take_note(Note(NOTE_GOD_POWER, you.religion, 1));switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:break;case GOD_KIKUBAAQUDGHA:simple_god_message(" is protecting you from some side-effects of death magic.");break;case GOD_VEHUMET:god_speaks(you.religion, "You can call upon Vehumet to aid your destructive magics with prayer.");break;default:strcpy(info, "You can now ");strcat(info,(you.religion == GOD_ZIN)? "call upon Zin for minor healing" :(you.religion == GOD_SHINING_ONE)? "smite your foes" :(you.religion == GOD_YREDELEMNUL)? "recall your undead slaves" :(you.religion == GOD_OKAWARU)? "call upon Okawaru for minor healing" :(you.religion == GOD_MAKHLEB)? "harness Makhleb's destructive might" :(you.religion == GOD_SIF_MUNA)? "freely open your mind to new spells" :(you.religion == GOD_TROG)? "give your body great, but temporary, strength" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for purification"// Unknown god: "endure this program bug @50");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety >= 75 && old_piety < 75){take_note(Note(NOTE_GOD_POWER, you.religion, 2));switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_OKAWARU:case GOD_NEMELEX_XOBEH:case GOD_SIF_MUNA:case GOD_TROG:break;case GOD_VEHUMET:god_speaks(you.religion,"During prayer you have some protection from summoned creatures.");break;default:strcpy(info, "You can now ");strcat(info,(you.religion == GOD_ZIN)? "call down a plague" :(you.religion == GOD_SHINING_ONE)? "dispel the undead" :(you.religion == GOD_KIKUBAAQUDGHA)? "permanently enslave the undead" :(you.religion == GOD_YREDELEMNUL)? "animate legions of the dead" :(you.religion == GOD_MAKHLEB)? "summon a lesser servant of Makhleb" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for moderate healing"// Unknown god: "endure this program bug @75");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety >= 100 && old_piety < 100){take_note(Note(NOTE_GOD_POWER, you.religion, 3));switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_OKAWARU:case GOD_NEMELEX_XOBEH:case GOD_KIKUBAAQUDGHA:case GOD_VEHUMET:break;case GOD_SIF_MUNA:simple_god_message(" is protecting you from some side-effects of spellcasting.");break;default:strcpy(info, "You can now ");strcat(info,(you.religion == GOD_ZIN)? "utter a Holy Word" :(you.religion == GOD_SHINING_ONE)? "hurl bolts of divine anger" :(you.religion == GOD_YREDELEMNUL)? "drain ambient lifeforce" :(you.religion == GOD_MAKHLEB)? "hurl Makhleb's greater destruction" :(you.religion == GOD_TROG)? "haste yourself" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon to restore your abilities"// Unknown god: "endure this program bug @100");
case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:case GOD_VEHUMET:case GOD_SIF_MUNA:case GOD_TROG:break;default:strcpy(info, "You can now ");strcat(info,(you.religion == GOD_ZIN)? "summon a guardian angel" :(you.religion == GOD_SHINING_ONE)? "summon a divine warrior" :(you.religion == GOD_KIKUBAAQUDGHA)? "summon an emissary of Death" :(you.religion == GOD_YREDELEMNUL)? "control the undead" :(you.religion == GOD_OKAWARU)? "haste yourself" :(you.religion == GOD_MAKHLEB)? "summon a greater servant of Makhleb" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for incredible healing"// Unknown god: "endure this program bug @120");strcat(info, ".");god_speaks(you.religion, info);break;
take_note(Note(NOTE_GOD_POWER, you.religion, i));const char* pmsg = god_gain_power_messages[(int)you.religion][i];const char first = pmsg[0];if ( first ){if ( isupper(first) )god_speaks(you.religion, pmsg);else{snprintf(info, INFO_SIZE, "You can now %s.", pmsg);god_speaks(you.religion, info);}}
case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:case GOD_VEHUMET:case GOD_SIF_MUNA:case GOD_TROG:break;default:strcpy(info, "You can no longer ");strcat(info,(you.religion == GOD_ZIN)? "summon guardian angels" :(you.religion == GOD_SHINING_ONE)? "summon divine warriors" :(you.religion == GOD_KIKUBAAQUDGHA)? "summon Death's emissaries" :(you.religion == GOD_YREDELEMNUL)? "control undead beings" :(you.religion == GOD_OKAWARU)? "haste yourself" :(you.religion == GOD_MAKHLEB)? "summon a greater servant of Makhleb" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for incredible healing"// Unknown god: "endure this program bug @120");strcat(info, ".");god_speaks(you.religion, info);break;
const char* pmsg=god_lose_power_messages[(int)you.religion][i];const char first = pmsg[0];if ( first ){if ( isupper(first) )god_speaks(you.religion, pmsg);else{snprintf(info,INFO_SIZE,"You can no longer %s.",pmsg);god_speaks(you.religion, info);}}
if (you.piety < 100 && old_piety >= 100){switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_OKAWARU:case GOD_NEMELEX_XOBEH:case GOD_KIKUBAAQUDGHA:case GOD_VEHUMET:break;case GOD_SIF_MUNA:god_speaks(you.religion,"Sif Muna is no longer protecting you from miscast magic.");break;default:strcpy(info, "You can no longer ");strcat(info,(you.religion == GOD_ZIN)? "utter a Holy Word" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon to restore your abilities" :(you.religion == GOD_SHINING_ONE)? "hurl bolts of divine anger" :(you.religion == GOD_YREDELEMNUL)? "drain ambient life force" :(you.religion == GOD_MAKHLEB)? "direct Makhleb's greater destructive powers" :(you.religion == GOD_TROG)? "haste yourself"// Unknown god: "endure this program bug @100");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety < 75 && old_piety >= 75){switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_OKAWARU:case GOD_NEMELEX_XOBEH:case GOD_SIF_MUNA:case GOD_TROG:break;case GOD_VEHUMET:simple_god_message(" will no longer shield you from summoned creatures.");break;default:strcpy(info, "You can no longer ");strcat(info,(you.religion == GOD_ZIN)? "call down a plague" :(you.religion == GOD_SHINING_ONE)? "dispel undead" :(you.religion == GOD_KIKUBAAQUDGHA)? "enslave undead" :(you.religion == GOD_YREDELEMNUL)? "animate legions of the dead" :(you.religion == GOD_MAKHLEB)? "summon a servant of Makhleb" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for moderate healing"// Unknown god: "endure this program bug @75");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety < 50 && old_piety >= 50){switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:break;case GOD_KIKUBAAQUDGHA:simple_god_message(" is no longer shielding you from miscast death magic.");break;case GOD_VEHUMET:simple_god_message(" will no longer aid your destructive magics.");break;default:strcpy(info, "You can no longer ");strcat(info,(you.religion == GOD_ZIN)? "call upon Zin for minor healing" :(you.religion == GOD_SHINING_ONE)? "smite your foes" :(you.religion == GOD_YREDELEMNUL)? "recall your undead slaves" :(you.religion == GOD_OKAWARU)? "call upon Okawaru for minor healing" :(you.religion == GOD_MAKHLEB)? "hurl Makhleb's destruction" :(you.religion == GOD_SIF_MUNA)? "forget spells at will" :(you.religion == GOD_TROG)? "give your body great, but temporary, strength" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for Purification"// Unknown god: "endure this program bug @50");strcat(info, ".");god_speaks(you.religion, info);break;}}if (you.piety < 30 && old_piety >= 30){switch (you.religion){case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:break;default:strcpy(info, "You can no longer ");strcat(info,(you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE)? "repel the undead" :(you.religion == GOD_KIKUBAAQUDGHA)? "recall your undead slaves" :(you.religion == GOD_YREDELEMNUL)? "animate corpses" :(you.religion == GOD_SIF_MUNA)? "tap ambient magical fields" :(you.religion == GOD_VEHUMET)? "gain power from killing in Vehumet's name" :(you.religion == GOD_MAKHLEB)? "gain power from killing in Makhleb's name" :(you.religion == GOD_OKAWARU)? "give your body great, but temporary, strength" :(you.religion == GOD_TROG)? "go berserk at will" :(you.religion == GOD_ELYVILON)? "call upon Elyvilon for minor healing."// Unknown god: "endure this program bug @30");strcat(info, ".");god_speaks(you.religion, info);break;}}
int piety_breakpoint(int i){int breakpoints[MAX_GOD_ABILITIES] = { 30, 50, 75, 100, 120 };if ( i >= MAX_GOD_ABILITIES || i < 0 )return 255;elsereturn breakpoints[i];}
/* I can't believe I'm writing code this bad */static int real_god_power( int religion, int idx ) {switch ( religion ) {case GOD_NO_GOD:case GOD_XOM:case GOD_NEMELEX_XOBEH:return -1;case GOD_ZIN:case GOD_SHINING_ONE:case GOD_YREDELEMNUL:case GOD_MAKHLEB:case GOD_ELYVILON:return idx;case GOD_KIKUBAAQUDGHA:if ( idx < 3 )return idx;if ( idx == 3 )return -1;return idx-1;case GOD_VEHUMET:return ( idx > 3 ? -1 : idx );case GOD_OKAWARU:if ( idx < 2 )return idx;if ( idx == 2 || idx == 3 )return -1;return idx - 2;case GOD_SIF_MUNA:if ( idx == 2 || idx == 4 ) return -1;if ( idx < 2 ) return idx;if ( idx == 3 ) return 2;case GOD_TROG:if ( idx == 2 || idx == 4 ) return -1;if ( idx < 2 ) return idx;if ( idx == 3 ) return idx-1;default:return -1;}
// return the real number of the power (casting out nonexistent powers),// starting from 0, or -1 if the power doesn't existstatic int real_god_power( int religion, int idx ){if ( god_gain_power_messages[religion][idx][0] == 0 )return -1;int count = 0;for ( int j = 0; j < idx; ++j )if ( god_gain_power_messages[religion][j][0] )++count;return count;
const ability_def &abil_info = get_ability_def( abil );const std::string cost = "(" + make_cost_description( abil_info ) + ")";
const char* pmsg = god_gain_power_messages[god][numpower];char buf[200];// if no message then no powerif ( !pmsg[0] )return false;// The power could be either passive or an active ability.// Determine which.const ability_type abil = god_abilities[god][numpower];if ( isupper(pmsg[0]) )strcpy(buf, pmsg);elsesnprintf(buf, sizeof buf, "You can %s.", pmsg);std::string cost;if ( abil != ABIL_NON_ABILITY ){cost = "(" + make_cost_description(get_ability_def(abil)) + ")";cost = std::string(79 - strlen(buf) - cost.length(), ' ') + cost;}
else{switch (which_god) //mv: finally let's print abilities{case GOD_ZIN:if (you.piety >= 30)print_god_abil_desc( ABIL_ZIN_REPEL_UNDEAD );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_ZIN_HEALING );if (you.piety >= 75)print_god_abil_desc( ABIL_ZIN_PESTILENCE );if (you.piety >= 100)print_god_abil_desc( ABIL_ZIN_HOLY_WORD );if (you.piety >= 120)print_god_abil_desc( ABIL_ZIN_SUMMON_GUARDIAN );break;case GOD_SHINING_ONE:if (you.piety >= 30)print_god_abil_desc( ABIL_TSO_REPEL_UNDEAD );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_TSO_SMITING );if (you.piety >= 75)print_god_abil_desc( ABIL_TSO_ANNIHILATE_UNDEAD );if (you.piety >= 100)print_god_abil_desc( ABIL_TSO_CLEANSING_FLAME );if (you.piety >= 120)print_god_abil_desc( ABIL_TSO_SUMMON_DAEVA );break;case GOD_KIKUBAAQUDGHA:if (you.piety >= 30)print_god_abil_desc( ABIL_KIKU_RECALL_UNDEAD_SLAVES );elsecprintf( "None." EOL );if (you.piety >= 50)cprintf("You are protected from some of the side-effects of death magic." EOL);if (you.piety >= 75)print_god_abil_desc( ABIL_KIKU_ENSLAVE_UNDEAD );if (you.piety >= 120)print_god_abil_desc( ABIL_KIKU_INVOKE_DEATH );break;case GOD_YREDELEMNUL:if (you.piety >= 30)print_god_abil_desc( ABIL_YRED_ANIMATE_CORPSE );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_YRED_RECALL_UNDEAD );if (you.piety >= 75)print_god_abil_desc( ABIL_YRED_ANIMATE_DEAD );if (you.piety >= 100)print_god_abil_desc( ABIL_YRED_DRAIN_LIFE );if (you.piety >= 120)print_god_abil_desc( ABIL_YRED_CONTROL_UNDEAD );break;case GOD_VEHUMET:if (you.piety >= 30){cprintf( "You can gain power from the those you kill " EOL" in Vehumet's name, or those slain by your servants." EOL );}elsecprintf( "None." EOL );if (you.piety >= 50)cprintf( "Vehumet assists with destructive magics during prayer." EOL );if (you.piety >= 75)cprintf( "During prayer you have some protection from summoned creatures." EOL );break;case GOD_OKAWARU:if (you.piety >= 30)print_god_abil_desc( ABIL_OKAWARU_MIGHT );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_OKAWARU_HEALING );if (you.piety >= 120)print_god_abil_desc( ABIL_OKAWARU_HASTE );break;case GOD_MAKHLEB:if (you.piety >= 30){cprintf( "You can gain power from the deaths " EOL" of those you kill in Makhleb's name." EOL );}elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_MAKHLEB_MINOR_DESTRUCTION );if (you.piety >= 75)print_god_abil_desc( ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB );if (you.piety >= 100)print_god_abil_desc( ABIL_MAKHLEB_MAJOR_DESTRUCTION );if (you.piety >= 120)print_god_abil_desc( ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB );break;case GOD_SIF_MUNA:if (you.piety >= 30)print_god_abil_desc( ABIL_SIF_MUNA_CHANNEL_ENERGY );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_SIF_MUNA_FORGET_SPELL );if (you.piety >= 100)cprintf( "You are protected from some side-effects of spellcasting." EOL );break;case GOD_TROG:if (you.piety >= 30)print_god_abil_desc( ABIL_TROG_BERSERK );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_TROG_MIGHT );if (you.piety >= 100)print_god_abil_desc( ABIL_TROG_HASTE_SELF );break;case GOD_ELYVILON:if (you.piety >= 30)print_god_abil_desc( ABIL_ELYVILON_LESSER_HEALING );elsecprintf( "None." EOL );if (you.piety >= 50)print_god_abil_desc( ABIL_ELYVILON_PURIFICATION );if (you.piety >= 75)print_god_abil_desc( ABIL_ELYVILON_HEALING );if (you.piety >= 100)print_god_abil_desc( ABIL_ELYVILON_RESTORATION );if (you.piety >= 120)print_god_abil_desc( ABIL_ELYVILON_GREATER_HEALING );break;default: //mv: default is Xom, Nemelex and all bugs.cprintf( "None." EOL );} //end of printing abilities}
if ( !have_any )cprintf( "None." EOL );
// declaring this const messes up externs later, so don't do itability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES] ={// no god{ ABIL_NON_ABILITY, ABIL_NON_ABILITY, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_NON_ABILITY },// Zin{ ABIL_ZIN_REPEL_UNDEAD, ABIL_ZIN_HEALING, ABIL_ZIN_PESTILENCE,ABIL_ZIN_HOLY_WORD, ABIL_ZIN_SUMMON_GUARDIAN },// TSO{ ABIL_TSO_REPEL_UNDEAD, ABIL_TSO_SMITING, ABIL_TSO_ANNIHILATE_UNDEAD,ABIL_TSO_CLEANSING_FLAME, ABIL_TSO_SUMMON_DAEVA },// Kikubaaqudgha{ ABIL_KIKU_RECALL_UNDEAD_SLAVES, ABIL_NON_ABILITY,ABIL_KIKU_ENSLAVE_UNDEAD, ABIL_NON_ABILITY,ABIL_KIKU_INVOKE_DEATH },// Yredelemnul{ ABIL_YRED_ANIMATE_CORPSE, ABIL_YRED_RECALL_UNDEAD,ABIL_YRED_ANIMATE_DEAD, ABIL_YRED_DRAIN_LIFE,ABIL_YRED_CONTROL_UNDEAD },// Xom{ ABIL_NON_ABILITY, ABIL_NON_ABILITY, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_NON_ABILITY },// Vehumet{ ABIL_NON_ABILITY, ABIL_NON_ABILITY, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_NON_ABILITY },// Okawaru{ ABIL_OKAWARU_MIGHT, ABIL_OKAWARU_HEALING, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_OKAWARU_HASTE },// Makhleb{ ABIL_NON_ABILITY, ABIL_MAKHLEB_MINOR_DESTRUCTION,ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB,ABIL_MAKHLEB_MAJOR_DESTRUCTION,ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB },// Sif Muna{ ABIL_SIF_MUNA_CHANNEL_ENERGY,ABIL_SIF_MUNA_FORGET_SPELL, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_NON_ABILITY },// Trog{ ABIL_TROG_BERSERK, ABIL_TROG_MIGHT, ABIL_NON_ABILITY,ABIL_TROG_HASTE_SELF, ABIL_NON_ABILITY },// Nemelex{ ABIL_NON_ABILITY, ABIL_NON_ABILITY, ABIL_NON_ABILITY,ABIL_NON_ABILITY, ABIL_NON_ABILITY },// Elyvilon{ ABIL_ELYVILON_LESSER_HEALING, ABIL_ELYVILON_PURIFICATION,ABIL_ELYVILON_HEALING, ABIL_ELYVILON_RESTORATION,ABIL_ELYVILON_GREATER_HEALING }};
case GOD_ZIN:if (you.piety >= 30)insert_ability( ABIL_ZIN_REPEL_UNDEAD );if (you.piety >= 50)insert_ability( ABIL_ZIN_HEALING );if (you.piety >= 75)insert_ability( ABIL_ZIN_PESTILENCE );if (you.piety >= 100)insert_ability( ABIL_ZIN_HOLY_WORD );if (you.piety >= 120)insert_ability( ABIL_ZIN_SUMMON_GUARDIAN );break;case GOD_SHINING_ONE:if (you.piety >= 30)insert_ability( ABIL_TSO_REPEL_UNDEAD );if (you.piety >= 50)insert_ability( ABIL_TSO_SMITING );if (you.piety >= 75)insert_ability( ABIL_TSO_ANNIHILATE_UNDEAD );if (you.piety >= 100)insert_ability( ABIL_TSO_CLEANSING_FLAME );if (you.piety >= 120)insert_ability( ABIL_TSO_SUMMON_DAEVA );break;case GOD_YREDELEMNUL:if (you.piety >= 30)insert_ability( ABIL_YRED_ANIMATE_CORPSE );if (you.piety >= 50)insert_ability( ABIL_YRED_RECALL_UNDEAD );if (you.piety >= 75)insert_ability( ABIL_YRED_ANIMATE_DEAD );if (you.piety >= 100)insert_ability( ABIL_YRED_DRAIN_LIFE );if (you.piety >= 120)insert_ability( ABIL_YRED_CONTROL_UNDEAD );break;case GOD_ELYVILON:if (you.piety >= 30)insert_ability( ABIL_ELYVILON_LESSER_HEALING );if (you.piety >= 50)insert_ability( ABIL_ELYVILON_PURIFICATION );if (you.piety >= 75)insert_ability( ABIL_ELYVILON_HEALING );if (you.piety >= 100)insert_ability( ABIL_ELYVILON_RESTORATION );if (you.piety >= 120)insert_ability( ABIL_ELYVILON_GREATER_HEALING );break;case GOD_MAKHLEB:if (you.piety >= 50)insert_ability( ABIL_MAKHLEB_MINOR_DESTRUCTION );if (you.piety >= 75)insert_ability( ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB );if (you.piety >= 100)insert_ability( ABIL_MAKHLEB_MAJOR_DESTRUCTION );if (you.piety >= 120)insert_ability( ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB );break;case GOD_KIKUBAAQUDGHA:if (you.piety >= 30)insert_ability( ABIL_KIKU_RECALL_UNDEAD_SLAVES );if (you.piety >= 75)insert_ability( ABIL_KIKU_ENSLAVE_UNDEAD );if (you.piety >= 120)insert_ability( ABIL_KIKU_INVOKE_DEATH );break;case GOD_OKAWARU:if (you.piety >= 30)insert_ability( ABIL_OKAWARU_MIGHT );if (you.piety >= 50)insert_ability( ABIL_OKAWARU_HEALING );if (you.piety >= 120)insert_ability( ABIL_OKAWARU_HASTE );break;case GOD_TROG:if (you.piety >= 30)insert_ability( ABIL_TROG_BERSERK );if (you.piety >= 50)insert_ability( ABIL_TROG_MIGHT );if (you.piety >= 100)insert_ability( ABIL_TROG_HASTE_SELF );break;case GOD_SIF_MUNA:if (you.piety >= 30)insert_ability( ABIL_SIF_MUNA_CHANNEL_ENERGY );if (you.piety >= 50)insert_ability( ABIL_SIF_MUNA_FORGET_SPELL );break;default:break;
if ( you.piety >= piety_breakpoint(i) ){ability_type abil = god_abilities[(int)you.religion][i];if ( abil != ABIL_NON_ABILITY )insert_ability(abil);}