Skip to content

Commit

Permalink
Fedhas rework part 11: remove ally conducts
Browse files Browse the repository at this point in the history
Now that Fedhas no longer makes any permanent allies, conducts related
to not letting those die don't make sense.
  • Loading branch information
gammafunk committed Sep 14, 2019
1 parent cfc5dc1 commit 441fe51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
2 changes: 0 additions & 2 deletions crawl-ref/source/conduct-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enum conduct_type
DID_ATTACK_HOLY,
DID_ATTACK_NEUTRAL,
DID_ATTACK_FRIEND,
DID_FRIEND_DIED,
DID_KILL_LIVING,
DID_KILL_UNDEAD,
DID_KILL_DEMON,
Expand All @@ -35,7 +34,6 @@ enum conduct_type
DID_HASTY, // Cheibriados
DID_CORPSE_VIOLATION, // Fedhas (Necromancy involving
// corpses/chunks).
DID_SOULED_FRIEND_DIED, // Zin
DID_ATTACK_IN_SANCTUARY, // Zin
DID_KILL_NONLIVING,
DID_EXPLORATION, // Ashenzari, wrath timers
Expand Down
35 changes: 9 additions & 26 deletions crawl-ref/source/god-conduct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ static const char *conducts[] =
{
"",
"Evil", "Holy", "Attack Holy", "Attack Neutral", "Attack Friend",
"Friend Died", "Kill Living", "Kill Undead", "Kill Demon",
"Kill Natural Evil", "Kill Unclean", "Kill Chaotic", "Kill Wizard",
"Kill Priest", "Kill Holy", "Kill Fast", "Banishment", "Spell Memorise",
"Spell Cast", "Spell Practise", "Cannibalism", "Eat Souled Being",
"Deliberate Mutation", "Cause Glowing", "Use Unclean", "Use Chaos",
"Desecrate Orcish Remains", "Kill Slime", "Kill Plant", "Was Hasty",
"Corpse Violation", "Souled Friend Died", "Attack In Sanctuary",
"Kill Artificial", "Exploration", "Desecrate Holy Remains", "Seen Monster",
"Sacrificed Love", "Channel", "Hurt Foe",
"Kill Living", "Kill Undead", "Kill Demon", "Kill Natural Evil",
"Kill Unclean", "Kill Chaotic", "Kill Wizard", "Kill Priest", "Kill Holy",
"Kill Fast", "Banishment", "Spell Memorise", "Spell Cast",
"Spell Practise", "Cannibalism", "Eat Souled Being", "Deliberate Mutation",
"Cause Glowing", "Use Unclean", "Use Chaos", "Desecrate Orcish Remains",
"Kill Slime", "Kill Plant", "Was Hasty", "Corpse Violation",
"Attack In Sanctuary", "Kill Artificial", "Exploration",
"Desecrate Holy Remains", "Seen Monster", "Sacrificed Love", "Channel",
"Hurt Foe",
};
COMPILE_CHECK(ARRAYSZ(conducts) == NUM_CONDUCTS);

Expand Down Expand Up @@ -257,20 +257,6 @@ static dislike_response _on_attack_friend(const char* desc)
};
}

/// Fedhas's response to a friend(ly plant) dying.
static dislike_response _on_fedhas_friend_death(const char* desc)
{
return
{
desc, false,
1, 0, nullptr, nullptr, [] (const monster* victim) -> bool {
// ballistomycetes are penalized separately.
return victim && fedhas_protects(*victim)
&& victim->mons_species() != MONS_BALLISTOMYCETE;
}
};
}

typedef map<conduct_type, dislike_response> peeve_map;

/// a per-god map of conducts to that god's angry reaction to those conducts.
Expand Down Expand Up @@ -426,9 +412,6 @@ static peeve_map divine_peeves[] =
1, 0
} },
{ DID_ATTACK_FRIEND, _on_attack_friend(nullptr) },

{ DID_FRIEND_DIED, _on_fedhas_friend_death("allied flora die") },
{ DID_SOULED_FRIEND_DIED, _on_fedhas_friend_death(nullptr) },
},
// GOD_CHEIBRIADOS,
{
Expand Down
15 changes: 0 additions & 15 deletions crawl-ref/source/mon-death.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2220,21 +2220,6 @@ item_def* monster_die(monster& mons, killer_type killer,

_fire_kill_conducts(mons, killer, killer_index, gives_player_xp);

// Kill conducts do not assess piety loss for friends
// killed by other monsters.
if (mons.friendly())
{
const bool sentient = mons_class_intel(mons.type) >= I_HUMAN;
// plant HD aren't very meaningful. (fedhas hack)
const int severity = mons.holiness() & MH_PLANT ?
1 :
1 + (mons.get_experience_level() / 4);

did_god_conduct(sentient ? DID_SOULED_FRIEND_DIED
: DID_FRIEND_DIED,
severity, true, &mons);
}

// Trying to prevent summoning abuse here, so we're trying to
// prevent summoned creatures from being done_good kills. Only
// affects creatures which were friendly when summoned.
Expand Down

0 comments on commit 441fe51

Please sign in to comment.