diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/beam.cc | 26 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/mon-data.h | 30 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 47 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 41 |
7 files changed, 125 insertions, 28 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 2c89e5eaf9..0bad5ecd37 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2657,7 +2657,7 @@ static void decrement_durations() // (killing monsters, offering items, ...) might be confusing for characters // of other religions. // For now, though, keep information about what happened hidden. - if (you.duration[DUR_PIETY_POOL] && one_chance_in(20)) + if (you.duration[DUR_PIETY_POOL] && one_chance_in(5)) { you.duration[DUR_PIETY_POOL]--; // decrease even if piety at maximum if (you.piety < 200) diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index a876a3fd02..a09fdbb141 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -70,7 +70,8 @@ // from remaining range #define MON_RESIST 0 // monster resisted #define MON_UNAFFECTED 1 // monster unaffected -#define MON_AFFECTED 2 // monster was unaffected +#define MON_AFFECTED 2 // monster was affected +#define MON_OTHER 3 // monster unaffected, but for other reasons static int spreadx[] = { 0, 0, 1, -1 }; static int spready[] = { -1, 1, 0, 0 }; @@ -2112,6 +2113,13 @@ int mons_ench_f2(monsters *monster, bolt &pbolt) return (MON_AFFECTED); } case BEAM_CHARM: /* 9 = charm */ + if (you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster)) + { + simple_monster_message(monster, " is repulsed!"); + return (MON_OTHER); + } + if (monster->add_ench(ENCH_CHARM)) { // put in an exception for fungi, plants and other things you won't @@ -4182,8 +4190,14 @@ static int affect_monster_enchantment(bolt &beam, monsters *mon) if (check_mons_resist_magic( mon, beam.ench_power )) return mons_immune_magic(mon) ? MON_UNAFFECTED : MON_RESIST; - simple_monster_message(mon, " is enslaved."); beam.obvious_effect = true; + if (you.religion == GOD_SHINING_ONE) + { + simple_monster_message(mon, " is repulsed!"); + return (MON_OTHER); + } + + simple_monster_message(mon, " is enslaved."); // wow, permanent enslaving mon->attitude = ATT_FRIENDLY; @@ -4208,8 +4222,14 @@ static int affect_monster_enchantment(bolt &beam, monsters *mon) if (mons_friendly(mon)) return (MON_UNAFFECTED); - simple_monster_message(mon, " is enslaved."); beam.obvious_effect = true; + if (you.religion == GOD_SHINING_ONE) + { + simple_monster_message(mon, " is repulsed!"); + return (MON_OTHER); + } + + simple_monster_message(mon, " is enslaved."); // wow, permanent enslaving if (one_chance_in(2 + mon->hit_dice / 4)) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 69332130f6..2da0262574 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -622,7 +622,8 @@ enum conduct_type DID_KILL_LIVING, DID_KILL_UNDEAD, DID_KILL_DEMON, - DID_KILL_NATURAL_EVIL, // unused + DID_KILL_NATURAL_EVIL, // TSO + DID_KILL_MUTATOR_OR_ROTTER, // Zin DID_KILL_WIZARD, DID_KILL_PRIEST, DID_KILL_ANGEL, @@ -630,7 +631,7 @@ enum conduct_type DID_LIVING_KILLED_BY_SERVANT, DID_UNDEAD_KILLED_BY_SERVANT, DID_DEMON_KILLED_BY_SERVANT, - DID_NATURAL_EVIL_KILLED_BY_SERVANT, // unused + DID_NATURAL_EVIL_KILLED_BY_SERVANT, // TSO DID_ANGEL_KILLED_BY_SERVANT, DID_SPELL_MEMORISE, DID_SPELL_CASTING, diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index d3a7611d12..fc4093a236 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -215,7 +215,7 @@ { MONS_GOBLIN, 'g', LIGHTGREY, "goblin", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 400, 10, MONS_GOBLIN, MONS_GOBLIN, MH_NATURAL, -1, { {AT_HIT, AF_PLAIN, 4}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -305,7 +305,7 @@ { MONS_ORC, 'o', LIGHTRED, "orc", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 600, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 5}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -492,7 +492,7 @@ // that they wield two weapons... I'm raising their xp modifier. -- bwr { MONS_TWO_HEADED_OGRE, 'O', LIGHTRED, "two-headed ogre", - M_WARM_BLOOD | M_EVIL | M_TWOWEAPON, + M_WARM_BLOOD | M_TWOWEAPON, MR_NO_FLAGS, 1500, 15, MONS_OGRE, MONS_TWO_HEADED_OGRE, MH_NATURAL, -4, { {AT_HIT, AF_PLAIN, 17}, {AT_HIT, AF_PLAIN, 13}, AT_NO_ATK, AT_NO_ATK }, @@ -525,7 +525,7 @@ { MONS_HOBGOBLIN, 'g', BROWN, "hobgoblin", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 500, 10, MONS_GOBLIN, MONS_HOBGOBLIN, MH_NATURAL, -1, { {AT_HIT, AF_PLAIN, 5}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -602,7 +602,7 @@ { MONS_OGRE, 'O', BROWN, "ogre", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 1300, 10, MONS_OGRE, MONS_OGRE, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 17}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -657,7 +657,7 @@ { MONS_TROLL, 'T', BROWN, "troll", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 1500, 10, MONS_TROLL, MONS_TROLL, MH_NATURAL, -3, { {AT_BITE, AF_PLAIN, 20}, {AT_CLAW, AF_PLAIN, 15}, {AT_CLAW, AF_PLAIN, 15}, AT_NO_ATK }, @@ -736,7 +736,7 @@ { MONS_ORC_WARRIOR, 'o', YELLOW, "orc warrior", - M_FIGHTER | M_WARM_BLOOD | M_EVIL, + M_FIGHTER | M_WARM_BLOOD, MR_NO_FLAGS, 0, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -758,7 +758,7 @@ { MONS_ORC_WIZARD, 'o', MAGENTA, "orc wizard", - M_SPELLCASTER | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_EVIL, + M_SPELLCASTER | M_ACTUAL_SPELLS | M_WARM_BLOOD, MR_NO_FLAGS, 0, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -5, { {AT_HIT, AF_PLAIN, 5}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -769,7 +769,7 @@ { MONS_ORC_KNIGHT, 'o', LIGHTCYAN, "orc knight", - M_FIGHTER | M_WARM_BLOOD | M_EVIL, + M_FIGHTER | M_WARM_BLOOD, MR_NO_FLAGS, 0, 10, MONS_ORC, MONS_ORC, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 25}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -807,7 +807,7 @@ { MONS_BIG_KOBOLD, 'K', RED, "big kobold", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 0, 10, MONS_KOBOLD, MONS_BIG_KOBOLD, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 7}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -1577,7 +1577,7 @@ { MONS_ROCK_TROLL, 'T', LIGHTGREY, "rock troll", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_NO_FLAGS, 2200, 11, MONS_TROLL, MONS_ROCK_TROLL, MH_NATURAL, -4, { {AT_BITE, AF_PLAIN, 30}, {AT_CLAW, AF_PLAIN, 20}, {AT_CLAW, AF_PLAIN, 20}, AT_NO_ATK }, @@ -1654,7 +1654,7 @@ { MONS_OGRE_MAGE, 'O', MAGENTA, "ogre-mage", - M_SPELLCASTER | M_ACTUAL_SPELLS | M_SEE_INVIS | M_WARM_BLOOD | M_EVIL, + M_SPELLCASTER | M_ACTUAL_SPELLS | M_SEE_INVIS | M_WARM_BLOOD, MR_RES_ELEC, 0, 16, MONS_OGRE, MONS_OGRE, MH_NATURAL, -6, { {AT_HIT, AF_PLAIN, 12}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -1859,7 +1859,7 @@ { MONS_IRON_TROLL, 'T', CYAN, "iron troll", - M_WARM_BLOOD | M_EVIL, + M_WARM_BLOOD, MR_RES_FIRE | MR_RES_COLD, 2400, 10, MONS_TROLL, MONS_IRON_TROLL, MH_NATURAL, -5, { {AT_BITE, AF_PLAIN, 35}, {AT_CLAW, AF_PLAIN, 25}, {AT_CLAW, AF_PLAIN, 25}, AT_NO_ATK }, @@ -2531,7 +2531,7 @@ { MONS_ORC_WARLORD, 'o', RED, "orc warlord", - M_FIGHTER | M_WARM_BLOOD | M_EVIL, + M_FIGHTER | M_WARM_BLOOD, MR_NO_FLAGS, 600, 15, MONS_ORC, MONS_ORC, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 32}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -2666,7 +2666,7 @@ { MONS_DEEP_ELF_ANNIHILATOR, 'e', GREEN, "deep elf annihilator", - M_SPELLCASTER | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_SEE_INVIS, + M_SPELLCASTER | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_SEE_INVIS | M_EVIL, MR_RES_ELEC, 450, 10, MONS_ELF, MONS_ELF, MH_NATURAL, -6, { {AT_HIT, AF_PLAIN, 12}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index b4b1f789b6..8ea1230d67 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -469,6 +469,22 @@ static bool monster_avoided_death(monsters *monster, killer_type killer, int i) return (false); } +bool is_mons_evil_demonic_or_undead(monsters *mons) +{ + return (mons_holiness(mons) == MH_UNDEAD + || mons_holiness(mons) == MH_DEMONIC + || mons_is_evil(mons)); +} + +static bool is_mons_mutator_or_rotter(monsters *mons) +{ + if (mons->has_ench(ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER)) + return true; + + const int attk_flavour = mons_attack_spec(mons, 0).flavour; + return (attk_flavour == AF_MUTATE || attk_flavour == AF_ROT); +} + void monster_die(monsters *monster, killer_type killer, int i, bool silent) { if (monster->type == -1) @@ -640,9 +656,16 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) did_god_conduct(DID_KILL_DEMON, monster->hit_dice, true, monster); - if (mons_class_flag(monster->type, M_EVIL)) + if (mons_class_flag(monster->type, M_EVIL) + && mons_holiness(monster) == MH_NATURAL) + { did_god_conduct(DID_KILL_NATURAL_EVIL, monster->hit_dice, true, monster); + } + + if (is_mons_mutator_or_rotter(monster)) + did_god_conduct(DID_KILL_MUTATOR_OR_ROTTER, + monster->hit_dice, true, monster); // jmf: Trog hates wizards if (mons_is_magic_user(monster)) @@ -663,7 +686,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) // born-friendly monsters. The mutation still applies, however. if (you.mutation[MUT_DEATH_STRENGTH] || (!created_friendly - && you.religion == GOD_MAKHLEB + && (you.religion == GOD_MAKHLEB + || you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster)) && (!player_under_penance() && random2(you.piety) >= 30))) { if (you.hp < you.hp_max) @@ -675,7 +700,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) } if (!created_friendly - && (you.religion == GOD_MAKHLEB || you.religion == GOD_VEHUMET) + && (you.religion == GOD_MAKHLEB || you.religion == GOD_VEHUMET + || you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster)) && (!player_under_penance() && random2(you.piety) >= 30)) { if (you.magic_points < you.max_magic_points) @@ -790,6 +817,20 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) inc_mp( 1 + random2(monster->hit_dice / 2), false ); } } + + if (you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster) + && (!player_under_penance() && random2(you.piety) >= 30)) + { + monsters *mon = &menv[i]; + if (mon->hit_points < mon->max_hit_points) + { + simple_monster_message(mon, " looks healthier."); + mon->hit_points += 1 + random2(monster->hit_dice / 4); + if (mon->hit_points > mon->max_hit_points) + mon->hit_points = mon->max_hit_points; + } + } } break; diff --git a/crawl-ref/source/monstuff.h b/crawl-ref/source/monstuff.h index 31424a7254..e097ac040f 100644 --- a/crawl-ref/source/monstuff.h +++ b/crawl-ref/source/monstuff.h @@ -65,6 +65,8 @@ enum poly_power_type { bool monster_polymorph(monsters *monster, monster_type targetc, poly_power_type p = PPT_SAME); +bool is_mons_evil_demonic_or_undead(monsters *mon); + // last updated: 08jun2000 {dlb} /* *********************************************************************** * called from: bang - beam - effects - fight - misc - monstuff - mstuff2 - diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 9412d32480..7ca88e86a8 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1335,6 +1335,32 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, } break; + case DID_KILL_NATURAL_EVIL: + if (you.religion == GOD_SHINING_ONE) + { + if (god_hates_attacking_friend(you.religion, victim)) + break; + + simple_god_message(" accepts your kill."); + ret = true; + if (random2(level + 18) > 3) + piety_change = 1; + } + break; + + case DID_KILL_MUTATOR_OR_ROTTER: + if (you.religion == GOD_ZIN) + { + if (god_hates_attacking_friend(you.religion, victim)) + break; + + simple_god_message(" appreciates the killing of a spawn of chaos."); + ret = true; + if (random2(level + 18) > 3) + piety_change = 1; + } + break; + case DID_KILL_PRIEST: if (you.religion == GOD_BEOGH && !god_hates_attacking_friend(you.religion, victim)) @@ -1437,7 +1463,6 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, case DID_UNDEAD_KILLED_BY_SERVANT: switch (you.religion) { - case GOD_ZIN: case GOD_SHINING_ONE: case GOD_VEHUMET: case GOD_MAKHLEB: @@ -1456,7 +1481,6 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, case DID_DEMON_KILLED_BY_SERVANT: switch (you.religion) { - case GOD_ZIN: case GOD_SHINING_ONE: simple_god_message(" accepts your collateral kill."); ret = true; @@ -1469,6 +1493,17 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, } break; + case DID_NATURAL_EVIL_KILLED_BY_SERVANT: + if (you.religion == GOD_SHINING_ONE) + { + simple_god_message(" accepts your collateral kill."); + ret = true; + + if (random2(level + 10) > 5) + piety_change = 1; + } + break; + case DID_SPELL_MEMORISE: if (you.religion == GOD_TROG) { @@ -1568,8 +1603,6 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, case DID_STIMULANTS: // unused case DID_EAT_MEAT: // unused case DID_CREATED_LIFE: // unused - case DID_KILL_NATURAL_EVIL: // unused - case DID_NATURAL_EVIL_KILLED_BY_SERVANT: // unused case DID_SPELL_NONUTILITY: // unused case NUM_CONDUCTS: break; |