summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commitc3c9b09d73391ed2d0a0864dc326fc6840da0e2e (patch)
tree5ac0f460840d77c83174a809281533c75158b735
parent7bf0a5a464c417cbe6d746a0deabd9538d66d4b1 (diff)
Remove inactive player_type::prot{good,undead}
-rw-r--r--src/dungeon.cc12
-rw-r--r--src/loadsave.cc2
-rw-r--r--src/melee1.cc28
-rw-r--r--src/player_type.hpp2
-rw-r--r--src/spells2.cc9
-rw-r--r--src/xtra2.cc39
-rw-r--r--src/xtra2.hpp2
7 files changed, 1 insertions, 93 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc
index 631a23e8..138d8c66 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -2135,18 +2135,6 @@ static void process_world(void)
(void)set_protevil(p_ptr->protevil - 1);
}
- /* Protection from good */
- if (p_ptr->protgood)
- {
- (void)set_protgood(p_ptr->protgood - 1);
- }
-
- /* Protection from undead */
- if (p_ptr->protundead)
- {
- (void)set_protundead(p_ptr->protundead - 1);
- }
-
/* Invulnerability */
if (p_ptr->invuln)
{
diff --git a/src/loadsave.cc b/src/loadsave.cc
index d6ca168a..8982d1cc 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -703,7 +703,6 @@ static bool_ do_extra(ls_flag_t flag)
do_s16b(&p_ptr->poisoned, flag);
do_s16b(&p_ptr->image, flag);
do_s16b(&p_ptr->protevil, flag);
- do_s16b(&p_ptr->protundead, flag);
do_s16b(&p_ptr->invuln, flag);
do_s16b(&p_ptr->hero, flag);
do_s16b(&p_ptr->shero, flag);
@@ -796,7 +795,6 @@ static bool_ do_extra(ls_flag_t flag)
do_byte(&p_ptr->allow_one_death, flag);
do_s16b(&no_breeds, flag);
- do_s16b(&p_ptr->protgood, flag);
/* Auxilliary variables */
do_u32b(&p_ptr->mimic_extra, flag);
diff --git a/src/melee1.cc b/src/melee1.cc
index 09de2cd9..7fdaca55 100644
--- a/src/melee1.cc
+++ b/src/melee1.cc
@@ -292,19 +292,6 @@ bool_ carried_make_attack_normal(int r_idx)
continue;
}
- /* Hack -- Apply "protection from good" */
- if ((p_ptr->protgood > 0) &&
- (r_ptr->flags & RF_GOOD) &&
- (p_ptr->lev >= rlev) &&
- ((rand_int(100) + p_ptr->lev) > 50))
- {
- /* Message */
- msg_format("%s is repelled.", sym_name);
-
- /* Hack -- Next attack */
- continue;
- }
-
/* Assume no cut or stun */
do_cut = do_stun = 0;
@@ -1194,7 +1181,7 @@ bool_ carried_make_attack_normal(int r_idx)
*/
void black_breath_attack(int chance)
{
- if (!p_ptr->protundead && randint(chance) == 1)
+ if (randint(chance) == 1)
{
msg_print("Your foe calls upon your soul!");
msg_print("You feel the Black Breath slowly draining you of life...");
@@ -1439,19 +1426,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
continue;
}
- /* Hack -- Apply "protection from good" */
- if ((p_ptr->protgood > 0) &&
- (r_ptr->flags & RF_GOOD) &&
- (p_ptr->lev >= rlev) &&
- ((rand_int(100) + p_ptr->lev) > 50))
- {
- /* Message */
- msg_format("%^s is repelled.", m_name);
-
- /* Hack -- Next attack */
- continue;
- }
-
/* Assume no cut or stun */
do_cut = do_stun = 0;
diff --git a/src/player_type.hpp b/src/player_type.hpp
index 3130d859..1285e018 100644
--- a/src/player_type.hpp
+++ b/src/player_type.hpp
@@ -107,8 +107,6 @@ struct player_type
s16b stun = 0; /* Timed -- Stun */
s16b protevil = 0; /* Timed -- Protection from Evil*/
- s16b protgood = 0; /* Timed -- Protection from Good*/
- s16b protundead = 0; /* Timed -- Protection from Undead*/
s16b invuln = 0; /* Timed -- Invulnerable */
s16b hero = 0; /* Timed -- Heroism */
s16b shero = 0; /* Timed -- Super Heroism */
diff --git a/src/spells2.cc b/src/spells2.cc
index da7f9ffc..45fd18eb 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -1257,10 +1257,6 @@ void self_knowledge(FILE *fff)
{
info[i++] = "You are protected from evil.";
}
- if (p_ptr->protgood)
- {
- info[i++] = "You are protected from good.";
- }
if (p_ptr->shield)
{
info[i++] = "You are protected by a mystic shield.";
@@ -1884,11 +1880,6 @@ void report_magics(void)
info2[i] = report_magics_aux(p_ptr->protevil);
info[i++] = "You are protected from evil";
}
- if (p_ptr->protgood)
- {
- info2[i] = report_magics_aux(p_ptr->protgood);
- info[i++] = "You are protected from good";
- }
if (p_ptr->shield)
{
info2[i] = report_magics_aux(p_ptr->shield);
diff --git a/src/xtra2.cc b/src/xtra2.cc
index b00a6802..8b444058 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -935,45 +935,6 @@ bool_ set_protevil(int v)
}
/*
- * Set "p_ptr->protgood", notice observable changes
- */
-bool_ set_protgood(int v)
-{
- bool_ notice = set_simple_field(
- &p_ptr->protgood, v,
- TERM_WHITE, "You feel safe from good!",
- TERM_WHITE, "You no longer feel safe from good.");
-
- if (notice)
- {
- /* Handle stuff */
- handle_stuff();
- }
-
- /* Result */
- return notice;
-}
-
-/*
- * Set "p_ptr->protundead", notice observable changes
- */
-bool_ set_protundead(int v)
-{
- bool_ notice = set_simple_field(
- &p_ptr->protundead, v,
- TERM_WHITE, "You feel safe from undead!",
- TERM_WHITE, "You no longer feel safe from undead.");
-
- if (notice) {
- /* Handle stuff */
- handle_stuff();
- }
-
- /* Result */
- return notice;
-}
-
-/*
* Set "p_ptr->set_shadow", notice observable changes
*/
bool_ set_shadow(int v)
diff --git a/src/xtra2.hpp b/src/xtra2.hpp
index 5ab6860c..a5e07cd3 100644
--- a/src/xtra2.hpp
+++ b/src/xtra2.hpp
@@ -47,8 +47,6 @@ extern bool_ set_blessed(int v);
extern bool_ set_hero(int v);
extern bool_ set_shero(int v);
extern bool_ set_protevil(int v);
-extern bool_ set_protgood(int v);
-extern bool_ set_protundead(int v);
extern bool_ set_invuln(int v);
extern bool_ set_tim_invis(int v);
extern bool_ set_tim_infra(int v);