From: David L. R. <dol...@us...> - 2010-09-30 12:01:46
|
via 147fa4f2495976018fe7b0552588224296fb7164 (commit) from 8e9c951481a8758182aebc687603b78b63e92be6 (commit) ----------------------------------------------------------------------- commit 147fa4f2495976018fe7b0552588224296fb7164 Author: David Lawrence Ramsey <dol...@us...> Date: Thu Sep 30 06:58:07 2010 -0500 Let Yred take kills of artificial beings. Currently, only golems and gargoyles are considered artificial. Statues either don't seem alive in the same way due to being immobile and spellcasting without speaking (cf. silver and orange crystal statues), or were not always statues and had natural origins (cf. Roxanne). And banning Statue Form could be confusing, as you are still considered alive when using it (you still have MH_NATURAL holiness), but that could just be an issue with the spell, or a way of balancing it. Friendly artificial beings are not forbidden; temporary friendly golems are rare due to high magic resistance (blocking Charm); permanent friendly golems are only possible as a card effectl and gargoyles are rare anyway. Beogh doesn't mind if you enslave non-orcs to do his bidding either, and I can't currently think of a proper aura that would enrage artificial beings, in any case. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/actor.h | 1 + crawl-ref/source/dat/descript/gods.txt | 2 +- crawl-ref/source/enum.h | 3 +++ crawl-ref/source/godconduct.cc | 30 +++++++++++++++++++++++++++++- crawl-ref/source/mon-class-flags.h | 3 +++ crawl-ref/source/mon-data.h | 21 +++++++++++---------- crawl-ref/source/mon-stuff.cc | 21 +++++++++++++++++++++ crawl-ref/source/monster.cc | 5 +++++ crawl-ref/source/monster.h | 1 + crawl-ref/source/player.cc | 5 +++++ crawl-ref/source/player.h | 1 + crawl-ref/source/religion.cc | 13 +++++++++++++ 12 files changed, 94 insertions(+), 12 deletions(-) diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index 3be9aea..197eb7d 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -219,6 +219,7 @@ public: virtual bool is_unholy() const = 0; virtual bool is_evil() const = 0; virtual bool is_chaotic() const = 0; + virtual bool is_artificial() const = 0; virtual bool is_insubstantial() const = 0; virtual int res_acid() const = 0; virtual int res_fire() const = 0; diff --git a/crawl-ref/source/dat/descript/gods.txt b/crawl-ref/source/dat/descript/gods.txt index 4383c45..0d499f1 100644 --- a/crawl-ref/source/dat/descript/gods.txt +++ b/crawl-ref/source/dat/descript/gods.txt @@ -28,7 +28,7 @@ Kikubaaqudgha is a terrible Demon-God, served by those who wish to indulge in th %%%% Yredelemnul -Yredelemnul the Dark is an evil God worshipped by those who seek powers over death and the undead. Followers, who must oppose all things holy, can raise legions of servile undead, and gain a number of other useful (if unpleasant) powers. Yredelemnul appreciates killing, but prefers corpses to be put to use rather than sacrificed. +Yredelemnul the Dark is an evil God worshipped by those who seek powers over death and the undead. Followers, who must oppose all things holy, can raise legions of servile undead, and gain a number of other useful (if unpleasant) powers. Yredelemnul appreciates killing, but prefers corpses to be put to use rather than sacrificed. Destroying artificial beings is also favoured, as they are neither truly alive nor subject to death or undeath. %%%% Xom diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 5dcd59a..b330050 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -812,6 +812,9 @@ enum conduct_type DID_UNCLEAN_KILLED_BY_SERVANT, // Zin DID_CHAOTIC_KILLED_BY_SERVANT, // Zin DID_ATTACK_IN_SANCTUARY, // Zin + DID_KILL_ARTIFICIAL, // Yredelemnul + DID_ARTIFICIAL_KILLED_BY_UNDEAD_SLAVE,// Yredelemnul + DID_ARTIFICIAL_KILLED_BY_SERVANT, // Yredelemnul NUM_CONDUCTS }; diff --git a/crawl-ref/source/godconduct.cc b/crawl-ref/source/godconduct.cc index a4051b0..6bb1a8e 100644 --- a/crawl-ref/source/godconduct.cc +++ b/crawl-ref/source/godconduct.cc @@ -481,6 +481,17 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, } break; + case DID_KILL_ARTIFICIAL: + if (you.religion == GOD_YREDELEMNUL + && !god_hates_attacking_friend(you.religion, victim)) + { + simple_god_message(" accepts your kill."); + retval = true; + piety_denom = level + 18; + piety_change = piety_denom - 3; + } + break; + // Note that holy deaths are special, they are always noticed... // If you or any friendly kills one, you'll get the credit or // the blame. @@ -728,6 +739,21 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, } break; + case DID_ARTIFICIAL_KILLED_BY_UNDEAD_SLAVE: + if (you.religion == GOD_YREDELEMNUL) + { + simple_god_message(" accepts your slave's kill."); + retval = true; + piety_denom = level + 18; + piety_change = piety_denom - 3; + } + break; + + // Currently used only when confused undead kill artificial + // beings, which Yredelemnul doesn't care about. + case DID_ARTIFICIAL_KILLED_BY_SERVANT: + break; + case DID_SPELL_MEMORISE: if (you.religion == GOD_TROG) { @@ -979,7 +1005,9 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, "Create Life", "Kill Slime", "Kill Plant", "Servant Kill Plant", "Was Hasty", "Gluttony", "Corpse Violation", "Souled Friend Died", "Servant Kill Unclean", - "Servant Kill Chaotic", "Attack In Sanctuary" + "Servant Kill Chaotic", "Attack In Sanctuary", + "Kill Artificial", "Undead Slave Kill Artificial", + "Servant Kill Artificial" }; COMPILE_CHECK(ARRAYSZ(conducts) == NUM_CONDUCTS, c1); diff --git a/crawl-ref/source/mon-class-flags.h b/crawl-ref/source/mon-class-flags.h index 1eeb88f..fffb263 100644 --- a/crawl-ref/source/mon-class-flags.h +++ b/crawl-ref/source/mon-class-flags.h @@ -121,4 +121,7 @@ const uint64_t M_ALWAYS_CORPSE = (uint64_t)1<<36; // is constantly "fleeing" const uint64_t M_FLEEING = (uint64_t)1<<37; + +// is an artificial being +const uint64_t M_ARTIFICIAL = (uint64_t)1<<38; #endif diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 9860aa6..87fd484 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4836,7 +4836,7 @@ static monsterentry mondata[] = { // golems ('8') { MONS_CLAY_GOLEM, '8', BROWN, "clay golem", - M_SEE_INVIS, + M_SEE_INVIS | M_ARTIFICIAL, mrd(MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC, 3), 0, 10, MONS_CLAY_GOLEM, MONS_CLAY_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 11}, {AT_HIT, AF_PLAIN, 11}, AT_NO_ATK, AT_NO_ATK }, @@ -4848,7 +4848,7 @@ static monsterentry mondata[] = { { MONS_WOOD_GOLEM, '8', YELLOW, "wood golem", - M_NO_FLAGS, + M_ARTIFICIAL, MR_RES_POISON | MR_VUL_FIRE | MR_RES_COLD | MR_RES_ELEC, 0, 10, MONS_CLAY_GOLEM, MONS_WOOD_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4860,7 +4860,7 @@ static monsterentry mondata[] = { { MONS_STONE_GOLEM, '8', LIGHTGREY, "stone golem", - M_NO_FLAGS, + M_ARTIFICIAL, mrd(MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC, 3), 0, 10, MONS_CLAY_GOLEM, MONS_STONE_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 28}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4872,7 +4872,7 @@ static monsterentry mondata[] = { { MONS_IRON_GOLEM, '8', CYAN, "iron golem", - M_SEE_INVIS, + M_ARTIFICIAL, mrd(MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC, 3), 0, 10, MONS_CLAY_GOLEM, MONS_IRON_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4884,7 +4884,7 @@ static monsterentry mondata[] = { { MONS_CRYSTAL_GOLEM, '8', GREEN, "crystal golem", - M_SEE_INVIS | M_SPEAKS, + M_SEE_INVIS | M_SPEAKS | M_ARTIFICIAL, mrd(MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC, 3), 0, 10, MONS_CLAY_GOLEM, MONS_CRYSTAL_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4896,7 +4896,7 @@ static monsterentry mondata[] = { { MONS_TOENAIL_GOLEM, '8', RED, "toenail golem", - M_NO_FLAGS, + M_ARTIFICIAL, MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC, 0, 10, MONS_CLAY_GOLEM, MONS_TOENAIL_GOLEM, MH_NONLIVING, MAG_IMMUNE, { {AT_HIT, AF_PLAIN, 13}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, @@ -4908,7 +4908,8 @@ static monsterentry mondata[] = { { MONS_ELECTRIC_GOLEM, '8', LIGHTCYAN, "electric golem", - M_SPELLCASTER | M_SEE_INVIS | M_INSUBSTANTIAL | M_GLOWS_LIGHT | M_SPEAKS, + M_SPELLCASTER | M_SEE_INVIS | M_INSUBSTANTIAL | M_GLOWS_LIGHT | M_SPEAKS + | M_ARTIFICIAL, mrd(MR_RES_ELEC | MR_RES_POISON, 3) | MR_RES_FIRE | MR_RES_COLD, 0, 10, MONS_CLAY_GOLEM, MONS_ELECTRIC_GOLEM, MH_NONLIVING, -8, { {AT_HIT, AF_ELEC, 15}, {AT_HIT, AF_ELEC, 15}, {AT_HIT, AF_PLAIN, 15}, @@ -4983,7 +4984,7 @@ static monsterentry mondata[] = { // gargoyles ('9') { MONS_GARGOYLE, '9', LIGHTGREY, "gargoyle", - M_NO_FLAGS, + M_ARTIFICIAL, MR_RES_POISON | MR_RES_ELEC, 0, 26, MONS_GARGOYLE, MONS_GARGOYLE, MH_NONLIVING, -6, { {AT_BITE, AF_PLAIN, 10}, {AT_CLAW, AF_PLAIN, 6}, {AT_CLAW, AF_PLAIN, 6}, @@ -4996,7 +4997,7 @@ static monsterentry mondata[] = { { MONS_METAL_GARGOYLE, '9', CYAN, "metal gargoyle", - M_NO_FLAGS, + M_ARTIFICIAL, MR_RES_POISON | MR_RES_ELEC, 0, 18, MONS_GARGOYLE, MONS_METAL_GARGOYLE, MH_NONLIVING, -6, { {AT_BITE, AF_PLAIN, 19}, {AT_CLAW, AF_PLAIN, 10}, @@ -5009,7 +5010,7 @@ static monsterentry mondata[] = { { MONS_MOLTEN_GARGOYLE, '9', RED, "molten gargoyle", - M_NO_FLAGS, + M_ARTIFICIAL, MR_RES_POISON | MR_RES_ELEC | mrd(MR_RES_FIRE, 3), 0, 18, MONS_GARGOYLE, MONS_MOLTEN_GARGOYLE, MH_NONLIVING, -6, { {AT_BITE, AF_FIRE, 12}, {AT_CLAW, AF_PLAIN, 8}, {AT_CLAW, AF_PLAIN, 8}, diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 8546290..81c24d2 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -1741,6 +1741,13 @@ int monster_die(monster* mons, killer_type killer, true, mons); } + // Yredelemnul hates artificial beings. + if (mons->is_artificial()) + { + did_god_conduct(DID_KILL_ARTIFICIAL, mons->hit_dice, + true, mons); + } + // Holy kills are always noticed. if (mons->is_holy()) { @@ -1911,6 +1918,14 @@ int monster_die(monster* mons, killer_type killer, notice |= did_god_conduct(DID_CHAOTIC_KILLED_BY_SERVANT, mons->hit_dice); } + + if (mons->is_artificial()) + { + notice |= did_god_conduct( + !confused ? DID_ARTIFICIAL_KILLED_BY_UNDEAD_SLAVE : + DID_ARTIFICIAL_KILLED_BY_SERVANT, + mons->hit_dice); + } } // Yes, we are splitting undead pets from the others // as a way to focus Necromancy vs. Summoning @@ -1962,6 +1977,12 @@ int monster_die(monster* mons, killer_type killer, notice |= did_god_conduct(DID_CHAOTIC_KILLED_BY_SERVANT, mons->hit_dice); } + + if (mons->is_artificial()) + { + notice |= did_god_conduct(DID_ARTIFICIAL_KILLED_BY_SERVANT, + mons->hit_dice); + } } // Holy kills are always noticed. diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 2b8df68..8416e31 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -3019,6 +3019,11 @@ bool monster::is_chaotic() const return (is_shapeshifter() || is_known_chaotic()); } +bool monster::is_artificial() const +{ + return (mons_class_flag(type, M_ARTIFICIAL)); +} + bool monster::is_insubstantial() const { return (mons_class_flag(type, M_INSUBSTANTIAL)); diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index e26245f..2aee89a 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -318,6 +318,7 @@ public: bool is_unclean() const; bool is_known_chaotic() const; bool is_chaotic() const; + bool is_artificial() const; bool is_insubstantial() const; int res_hellfire() const; int res_fire() const; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 72f19d5..48e240d 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5674,6 +5674,11 @@ bool player::is_chaotic() const return (false); } +bool player::is_artificial() const +{ + return (false); +} + // This is a stub. Makes checking for silver damage a little cleaner. bool player::is_insubstantial() const { diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index ac2249b..1b68532 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -503,6 +503,7 @@ public: bool is_unholy() const; bool is_evil() const; bool is_chaotic() const; + bool is_artificial() const; bool is_insubstantial() const; int res_acid() const; int res_fire() const; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index fdf8199..1d28888 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -651,6 +651,16 @@ std::string get_god_likes(god_type which_god, bool verbose) switch (which_god) { + case GOD_YREDELEMNUL: + likes.push_back("you or your undead slaves kill artificial beings"); + break; + + default: + break; + } + + switch (which_god) + { case GOD_MAKHLEB: case GOD_LUGONU: likes.push_back("you or your allies kill holy beings"); break; @@ -3146,6 +3156,9 @@ bool player_can_join_god(god_type which_god) if (is_good_god(which_god) && you.undead_or_demonic()) return (false); + if (which_god == GOD_YREDELEMNUL && you.is_artificial()) + return (false); + if (which_god == GOD_BEOGH && you.species != SP_HILL_ORC) return (false); -- Dungeon Crawl Stone Soup |