summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-06-20 22:49:05 +0200
committerBardur Arantsson <bardur@scientician.net>2016-06-20 22:49:05 +0200
commit7137a17f77fd3b6c3bbcefa2d621b3a11f161679 (patch)
treed76a6e842933cfb0d53402c45afb120d4c520d2e
parent7f7462188e2a213518acc979e3698746f098d7ab (diff)
Remove monster memory
Instead of having monster memory, the player automatically knows everything about all monsters from the start.
-rw-r--r--lib/edit/a_info.txt2
-rw-r--r--lib/edit/ba_info.txt4
-rw-r--r--lib/edit/k_info.txt8
-rw-r--r--lib/edit/st_info.txt3
-rw-r--r--lib/help/defines.txt1
-rw-r--r--lib/help/m_divin.txt2
-rw-r--r--lib/help/m_music.txt3
-rw-r--r--lib/mods/theme/edit/a_info.txt2
-rw-r--r--lib/mods/theme/edit/ba_info.txt6
-rw-r--r--lib/mods/theme/edit/k_info.txt13
-rw-r--r--lib/mods/theme/edit/st_info.txt3
-rw-r--r--lib/mods/theme/help/defines.txt1
-rw-r--r--lib/mods/theme/help/m_divin.txt2
-rw-r--r--lib/mods/theme/help/m_music.txt3
-rw-r--r--src/birth.cc1
-rw-r--r--src/bldg.cc6
-rw-r--r--src/cmd1.cc236
-rw-r--r--src/cmd3.cc226
-rw-r--r--src/cmd3.hpp1
-rw-r--r--src/cmd4.cc31
-rw-r--r--src/cmd6.cc73
-rw-r--r--src/defines.h11
-rw-r--r--src/loadsave.cc81
-rw-r--r--src/melee1.cc357
-rw-r--r--src/melee2.cc268
-rw-r--r--src/monster1.cc374
-rw-r--r--src/monster1.hpp2
-rw-r--r--src/monster2.cc111
-rw-r--r--src/monster2.hpp2
-rw-r--r--src/monster3.cc7
-rw-r--r--src/monster_race.hpp28
-rw-r--r--src/object2.cc1
-rw-r--r--src/spells1.cc144
-rw-r--r--src/spells2.cc121
-rw-r--r--src/spells2.hpp2
-rw-r--r--src/spells5.cc5
-rw-r--r--src/variable.cc1
-rw-r--r--src/variable.hpp1
-rw-r--r--src/xtra1.cc4
-rw-r--r--src/xtra2.cc27
40 files changed, 212 insertions, 1962 deletions
diff --git a/lib/edit/a_info.txt b/lib/edit/a_info.txt
index 645af426..4f52a413 100644
--- a/lib/edit/a_info.txt
+++ b/lib/edit/a_info.txt
@@ -1067,7 +1067,6 @@ N:43:of Numenor
I:33:12:3
W:60:30:40:50000
P:0:1d1:0:0:18
-F:ACTIVATE
F:CHR
F:DEX
F:DRAIN_MANA
@@ -1084,7 +1083,6 @@ F:RES_SOUND
F:SEARCH
F:SEE_INVIS
F:SPEED
-a:NUMENOR
D:A crown of massive gold, set with wondrous jewels of thought and warding,
D:worn by the kings of ancient Numenor. Its wearer may go into battle
D:always knowing what he faces - unless his own folly blinds him to the
diff --git a/lib/edit/ba_info.txt b/lib/edit/ba_info.txt
index e5c49759..20e7bb77 100644
--- a/lib/edit/ba_info.txt
+++ b/lib/edit/ba_info.txt
@@ -85,10 +85,6 @@ N:17:Look at busts of Kings
C:0:0:0
I:5:0:l
-N:18:Research monster
-C:1600:1500:1400
-I:20:0:r
-
N:21:Get quest monster
C:0:0:0
I:54:0:q
diff --git a/lib/edit/k_info.txt b/lib/edit/k_info.txt
index 8683b4bd..7bc01b5e 100644
--- a/lib/edit/k_info.txt
+++ b/lib/edit/k_info.txt
@@ -3338,14 +3338,6 @@ A:5/1:10/1:20/1
P:0:1d1:0:0:0
D:Zapping this rod will release a minor detection magic, alerting you of nearby pits and snares.
-N:353:Probing
-G:-:d
-I:66:7:50
-W:40:0:15:4000
-A:40/4
-P:0:1d1:0:0:0
-D:A rod of knowledge which will tell you about nearby creatures' health.
-
N:354:Recall
G:-:d
I:66:3:80
diff --git a/lib/edit/st_info.txt b/lib/edit/st_info.txt
index 83b29b44..f2e6f281 100644
--- a/lib/edit/st_info.txt
+++ b/lib/edit/st_info.txt
@@ -224,7 +224,6 @@ I:100:Lightning Resistance
I:100:Searching
I:100:Cure Light Wounds
# Rods
-I:100:Probing
I:25:& Wooden Rod~ of#
# Book
T:100:111:50
@@ -337,7 +336,7 @@ G:+:s
W:0
N:16:Beastmaster Shanty
-A:18:0:21:22:0:0
+A:0:0:21:22:0:0
O:19:19:19:19
G:+:g
W:0
diff --git a/lib/help/defines.txt b/lib/help/defines.txt
index 147e61a1..5093d994 100644
--- a/lib/help/defines.txt
+++ b/lib/help/defines.txt
@@ -396,7 +396,6 @@ TV_BOOK 111 /* spell books */
SV_ROD_ILLUMINATION 4
SV_ROD_MAPPING 5
SV_ROD_DETECTION 6
- SV_ROD_PROBING 7
SV_ROD_CURING 8
SV_ROD_HEALING 9
SV_ROD_RESTORATION 10
diff --git a/lib/help/m_divin.txt b/lib/help/m_divin.txt
index 9d3455fc..e6490df8 100644
--- a/lib/help/m_divin.txt
+++ b/lib/help/m_divin.txt
@@ -25,7 +25,7 @@ There are six spells available for the divination school. These Spells are:
Asks for an object and identifies it.
At spell level 17 it identifies all objects in the inventory.
At spell level 27 it identifies all objects in the inventory and in a
- radius on the floor, as well as probing monsters in that radius.
+ radius on the floor.
4. [[[[[sReveal Ways] (school level 9)
Detects the doors/stairs/ways in a certain radius around you.
5. [[[[[sVision] (school level 15)
diff --git a/lib/help/m_music.txt b/lib/help/m_music.txt
index 0f84f08f..40116252 100644
--- a/lib/help/m_music.txt
+++ b/lib/help/m_music.txt
@@ -61,8 +61,7 @@ of instrument contains a different family of musical songs:
Consumes mana each turn.
5. [[[[[vClairaudience(IV)] (School level 25)
Allows you to sense monster minds as long as you sing.
- At level 10 it identifies all objects in a radius on the floor,
- as well as probing monsters in that radius.
+ At level 10 it identifies all objects in a radius on the floor.
Consumes mana each turn.
#####GHorns
diff --git a/lib/mods/theme/edit/a_info.txt b/lib/mods/theme/edit/a_info.txt
index f1e19dbf..b822ab60 100644
--- a/lib/mods/theme/edit/a_info.txt
+++ b/lib/mods/theme/edit/a_info.txt
@@ -1067,7 +1067,6 @@ N:43:of Numenor
I:33:12:3
W:60:30:40:50000
P:0:1d1:0:0:18
-F:ACTIVATE
F:CHR
F:DEX
F:DRAIN_MANA
@@ -1084,7 +1083,6 @@ F:RES_SOUND
F:SEARCH
F:SEE_INVIS
F:SPEED
-a:NUMENOR
D:A crown of massive gold, set with wondrous jewels of thought and warding,
D:worn by the kings of ancient Numenor. Its wearer may go into battle
D:always knowing what he faces - unless his own folly blinds him to the
diff --git a/lib/mods/theme/edit/ba_info.txt b/lib/mods/theme/edit/ba_info.txt
index b0270989..c8c7f9c5 100644
--- a/lib/mods/theme/edit/ba_info.txt
+++ b/lib/mods/theme/edit/ba_info.txt
@@ -85,10 +85,6 @@ N:17:Look at busts of Kings
C:0:0:0
I:5:0:l
-N:18:Research monster
-C:1600:1500:1400
-I:20:0:r
-
N:21:Get quest monster
C:0:0:0
I:54:0:q
@@ -257,4 +253,4 @@ I:18:2:f
# Ask Bard for directions to Erebor
N:66:Ask about Erebor
C:0:0:0
-I:66:0:a \ No newline at end of file
+I:66:0:a
diff --git a/lib/mods/theme/edit/k_info.txt b/lib/mods/theme/edit/k_info.txt
index 055f9e5e..a4c5d2db 100644
--- a/lib/mods/theme/edit/k_info.txt
+++ b/lib/mods/theme/edit/k_info.txt
@@ -3277,19 +3277,6 @@ F:IGNORE_ELEC
F:IGNORE_FIRE
D:Zapping this rod will release a minor detection magic, alerting you of nearby pits and snares.
-N:353:Probing
-G:-:d
-I:66:7:50
-W:40:0:15:4000
-A:40/4
-P:0:1d1:0:0:0
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:A rod of knowledge which will tell you about nearby creatures' health.
-D:If they are sleeping, the intrusion will wake them.
-
N:354:Recall
G:-:d
I:66:3:80
diff --git a/lib/mods/theme/edit/st_info.txt b/lib/mods/theme/edit/st_info.txt
index 512258ca..d00e3415 100644
--- a/lib/mods/theme/edit/st_info.txt
+++ b/lib/mods/theme/edit/st_info.txt
@@ -218,7 +218,6 @@ T:100:40:7
I:100:Searching
I:100:Cure Light Wounds
# Rods
-I:100:Probing
I:25:& Wooden Rod~ of#
# Book
T:100:111:50
@@ -377,7 +376,7 @@ T:65:8:17
T:60:8:18
# Monstrous Compendium 11
T:55:8:19
-A:18:2:21:22:3:0
+A:0:2:21:22:3:0
O:94:95:96:97
G:+:g
W:24
diff --git a/lib/mods/theme/help/defines.txt b/lib/mods/theme/help/defines.txt
index 147e61a1..5093d994 100644
--- a/lib/mods/theme/help/defines.txt
+++ b/lib/mods/theme/help/defines.txt
@@ -396,7 +396,6 @@ TV_BOOK 111 /* spell books */
SV_ROD_ILLUMINATION 4
SV_ROD_MAPPING 5
SV_ROD_DETECTION 6
- SV_ROD_PROBING 7
SV_ROD_CURING 8
SV_ROD_HEALING 9
SV_ROD_RESTORATION 10
diff --git a/lib/mods/theme/help/m_divin.txt b/lib/mods/theme/help/m_divin.txt
index df92c11b..e03bd334 100644
--- a/lib/mods/theme/help/m_divin.txt
+++ b/lib/mods/theme/help/m_divin.txt
@@ -26,7 +26,7 @@ There are six spells available for the divination school. These Spells are:
Asks for an object and identifies it.
At spell level 17 it identifies all objects in the inventory.
At spell level 27 it identifies all objects in the inventory and in a
- radius on the floor, as well as probing monsters in that radius.
+ radius on the floor.
4. [[[[[sReveal Ways] (school level 9)
Detects the doors/stairs/ways in a certain radius around you.
5. [[[[[sVision] (school level 15)
diff --git a/lib/mods/theme/help/m_music.txt b/lib/mods/theme/help/m_music.txt
index 0f84f08f..40116252 100644
--- a/lib/mods/theme/help/m_music.txt
+++ b/lib/mods/theme/help/m_music.txt
@@ -61,8 +61,7 @@ of instrument contains a different family of musical songs:
Consumes mana each turn.
5. [[[[[vClairaudience(IV)] (School level 25)
Allows you to sense monster minds as long as you sing.
- At level 10 it identifies all objects in a radius on the floor,
- as well as probing monsters in that radius.
+ At level 10 it identifies all objects in a radius on the floor.
Consumes mana each turn.
#####GHorns
diff --git a/src/birth.cc b/src/birth.cc
index 09dabe24..fb0c2a0d 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -823,7 +823,6 @@ static void player_wipe(void)
cheat_hear = FALSE;
cheat_room = FALSE;
cheat_xtra = FALSE;
- cheat_know = FALSE;
cheat_live = FALSE;
/* Assume no winning game */
diff --git a/src/bldg.cc b/src/bldg.cc
index dc82f4ac..db76b92a 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -1218,12 +1218,6 @@ bool_ bldg_process_command(store_type *s_ptr, int i)
break;
}
- case BACT_RESEARCH_MONSTER:
- {
- paid = !research_mon();
- break;
- }
-
case BACT_COMPARE_WEAPONS:
{
paid = compare_weapons();
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 0228412f..112bd376 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -261,109 +261,60 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Slay Animal */
if ((f1 & (TR1_SLAY_ANIMAL)) && (r_ptr->flags3 & (RF3_ANIMAL)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_ANIMAL);
- }
-
if (mult < 2) mult = 2;
}
/* Slay Evil */
if ((f1 & (TR1_SLAY_EVIL)) && (r_ptr->flags3 & (RF3_EVIL)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_EVIL);
- }
-
if (mult < 2) mult = 2;
}
/* Slay Undead */
if ((f1 & (TR1_SLAY_UNDEAD)) && (r_ptr->flags3 & (RF3_UNDEAD)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_UNDEAD);
- }
-
if (mult < 3) mult = 3;
}
/* Slay Demon */
if ((f1 & (TR1_SLAY_DEMON)) && (r_ptr->flags3 & (RF3_DEMON)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_DEMON);
- }
-
if (mult < 3) mult = 3;
}
/* Slay Orc */
if ((f1 & (TR1_SLAY_ORC)) && (r_ptr->flags3 & (RF3_ORC)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_ORC);
- }
-
if (mult < 3) mult = 3;
}
/* Slay Troll */
if ((f1 & (TR1_SLAY_TROLL)) && (r_ptr->flags3 & (RF3_TROLL)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_TROLL);
- }
-
if (mult < 3) mult = 3;
}
/* Slay Giant */
if ((f1 & (TR1_SLAY_GIANT)) && (r_ptr->flags3 & (RF3_GIANT)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_GIANT);
- }
-
if (mult < 3) mult = 3;
}
/* Slay Dragon */
if ((f1 & (TR1_SLAY_DRAGON)) && (r_ptr->flags3 & (RF3_DRAGON)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_DRAGON);
- }
-
if (mult < 3) mult = 3;
}
/* Execute Dragon */
if ((f1 & (TR1_KILL_DRAGON)) && (r_ptr->flags3 & (RF3_DRAGON)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_DRAGON);
- }
-
if (mult < 5) mult = 5;
}
/* Execute Undead */
if ((f5 & (TR5_KILL_UNDEAD)) && (r_ptr->flags3 & (RF3_UNDEAD)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_UNDEAD);
- }
if (mult < 5) mult = 5;
}
@@ -371,11 +322,6 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Execute Demon */
if ((f5 & (TR5_KILL_DEMON)) && (r_ptr->flags3 & (RF3_DEMON)))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_DEMON);
- }
-
if (mult < 5) mult = 5;
}
@@ -383,26 +329,14 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Acid) */
if (f1 & (TR1_BRAND_ACID))
{
- /* Notice immunity */
if (r_ptr->flags3 & (RF3_IM_ACID))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_ACID);
- }
+ // No additional multiplier
}
-
- /* Notice susceptibility */
else if (r_ptr->flags9 & (RF9_SUSCEP_ACID))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags9 |= (RF9_SUSCEP_ACID);
- }
if (mult < 6) mult = 6;
}
-
- /* Otherwise, take the damage */
else
{
if (mult < 3) mult = 3;
@@ -412,26 +346,14 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Elec) */
if (f1 & (TR1_BRAND_ELEC))
{
- /* Notice immunity */
if (r_ptr->flags3 & (RF3_IM_ELEC))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_ELEC);
- }
+ // No additional multiplier
}
-
- /* Notice susceptibility */
else if (r_ptr->flags9 & (RF9_SUSCEP_ELEC))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags9 |= (RF9_SUSCEP_ELEC);
- }
if (mult < 6) mult = 6;
}
-
- /* Otherwise, take the damage */
else
{
if (mult < 3) mult = 3;
@@ -441,26 +363,14 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Fire) */
if (f1 & (TR1_BRAND_FIRE))
{
- /* Notice immunity */
if (r_ptr->flags3 & (RF3_IM_FIRE))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_FIRE);
- }
+ // No additional multiplier
}
-
- /* Notice susceptibility */
else if (r_ptr->flags3 & (RF3_SUSCEP_FIRE))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_SUSCEP_FIRE);
- }
if (mult < 6) mult = 6;
}
-
- /* Otherwise, take the damage */
else
{
if (mult < 3) mult = 3;
@@ -470,26 +380,14 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Cold) */
if (f1 & (TR1_BRAND_COLD))
{
- /* Notice immunity */
if (r_ptr->flags3 & (RF3_IM_COLD))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_COLD);
- }
+ // No additional multiplier
}
-
- /* Notice susceptibility */
else if (r_ptr->flags3 & (RF3_SUSCEP_COLD))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_SUSCEP_COLD);
- }
if (mult < 6) mult = 6;
}
-
- /* Otherwise, take the damage */
else
{
if (mult < 3) mult = 3;
@@ -499,27 +397,15 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Poison) */
if (f1 & (TR1_BRAND_POIS) || (p_ptr->tim_poison))
{
- /* Notice immunity */
if (r_ptr->flags3 & (RF3_IM_POIS))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_POIS);
- }
+ // No additional damage
}
-
- /* Notice susceptibility */
else if (r_ptr->flags9 & (RF9_SUSCEP_POIS))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags9 |= (RF9_SUSCEP_POIS);
- }
if (mult < 6) mult = 6;
if (magik(95)) *special |= SPEC_POIS;
}
-
- /* Otherwise, take the damage */
else
{
if (mult < 3) mult = 3;
@@ -530,16 +416,10 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Wounding */
if (f5 & (TR5_WOUNDING))
{
- /* Notice immunity */
if (r_ptr->flags8 & (RF8_NO_CUT))
{
- if (m_ptr->ml)
- {
- r_info[m_ptr->r_idx].r_flags8 |= (RF8_NO_CUT);
- }
+ // No additional damage
}
-
- /* Otherwise, take the damage */
else
{
if (magik(50)) *special |= SPEC_CUT;
@@ -703,7 +583,6 @@ void touch_zap_player(monster_type *m_ptr)
if (p_ptr->sensible_fire) aura_damage = (aura_damage + 2) * 2;
take_hit(aura_damage, aura_dam);
- r_ptr->r_flags2 |= RF2_AURA_FIRE;
handle_stuff();
}
}
@@ -726,7 +605,6 @@ void touch_zap_player(monster_type *m_ptr)
msg_print("You get zapped!");
take_hit(aura_damage, aura_dam);
- r_ptr->r_flags2 |= RF2_AURA_ELEC;
handle_stuff();
}
}
@@ -792,9 +670,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool_ visible = FALSE;
- bool_ obvious = FALSE;
-
int power = 0;
int damage = 0;
@@ -818,9 +693,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
/* break; */
}
- /* Extract visibility (before blink) */
- visible = TRUE;
-
/* Extract the attack "power" */
power = get_attack_power(effect);
@@ -1007,9 +879,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
- /* Hack -- assume all attacks are obvious */
- obvious = TRUE;
-
/* Roll out the damage */
damage = damroll(d_dice, d_side);
@@ -1173,8 +1042,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
blinked = FALSE;
msg_format("You are suddenly very hot!");
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_FIRE;
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
damroll(1 + ((t_ptr->level) / 26),
@@ -1190,8 +1057,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
blinked = FALSE;
msg_format("You get zapped!");
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_ELEC;
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
damroll(1 + ((t_ptr->level) / 26),
@@ -1230,21 +1095,6 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
}
}
-
-
- /* Analyze "visible" monsters only */
- if (visible)
- {
- /* Count "obvious" attacks (and ones that cause damage) */
- if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10))
- {
- /* Count attacks of this type */
- if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR)
- {
- r_ptr->r_blows[ap_cnt]++;
- }
- }
- }
}
/* Blink away */
@@ -1310,9 +1160,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
for (ap_cnt = 0; ap_cnt < (p_ptr->num_blow > 4) ? 4 : p_ptr->num_blow;
ap_cnt++)
{
- bool_ visible = FALSE;
- bool_ obvious = FALSE;
-
int power = 0;
int damage = 0;
@@ -1336,9 +1183,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
/* break; */
}
- /* Extract visibility (before blink) */
- visible = TRUE;
-
/* Extract the attack "power" */
power = get_attack_power(effect);
@@ -1525,9 +1369,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
- /* Hack -- assume all attacks are obvious */
- obvious = TRUE;
-
/* Roll out the damage */
damage = damroll(d_dice, d_side) + p_ptr->to_d;
@@ -1689,8 +1530,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
blinked = FALSE;
msg_format("You are suddenly very hot!");
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_FIRE;
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
damroll(1 + ((t_ptr->level) / 26),
@@ -1706,8 +1545,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
blinked = FALSE;
msg_format("You get zapped!");
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_ELEC;
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
damroll(1 + ((t_ptr->level) / 26),
@@ -1748,21 +1585,6 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
}
}
-
-
- /* Analyze "visible" monsters only */
- if (visible)
- {
- /* Count "obvious" attacks (and ones that cause damage) */
- if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10))
- {
- /* Count attacks of this type */
- if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR)
- {
- r_ptr->r_blows[ap_cnt]++;
- }
- }
- }
}
/* Blink away */
@@ -1838,22 +1660,20 @@ void attack_special(monster_type *m_ptr, s32b special, int dam)
/* Special - Cut monster */
if (special & SPEC_CUT)
{
- /* Cut the monster */
if (r_ptr->flags8 & (RF8_NO_CUT))
{
- if (m_ptr->ml)
- {
- r_info[m_ptr->r_idx].r_flags8 |= (RF8_NO_CUT);
- }
+ // No damage
}
else if (rand_int(100) >= r_ptr->level)
{
- /* Already partially poisoned */
- if (m_ptr->bleeding) msg_format("%^s is bleeding more strongly.",
- m_name);
- /* Was not poisoned */
+ if (m_ptr->bleeding)
+ {
+ msg_format("%^s is bleeding more strongly.", m_name);
+ }
else
+ {
msg_format("%^s is bleeding.", m_name);
+ }
m_ptr->bleeding += dam * 2;
}
@@ -1862,36 +1682,33 @@ void attack_special(monster_type *m_ptr, s32b special, int dam)
/* Special - Poison monster */
if (special & SPEC_POIS)
{
- /* Poison the monster */
if (r_ptr->flags3 & (RF3_IM_POIS))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_IM_POIS);
- }
+ // No damage
}
- /* Notice susceptibility */
else if (r_ptr->flags9 & (RF9_SUSCEP_POIS))
{
- if (m_ptr->ml)
+ if (m_ptr->poisoned)
{
- r_ptr->r_flags9 |= (RF9_SUSCEP_POIS);
+ msg_format("%^s is more poisoned.", m_name);
}
- /* Already partially poisoned */
- if (m_ptr->poisoned) msg_format("%^s is more poisoned.", m_name);
- /* Was not poisoned */
else
+ {
msg_format("%^s is poisoned.", m_name);
+ }
m_ptr->poisoned += dam * 2;
}
else if (rand_int(100) >= r_ptr->level)
{
- /* Already partially poisoned */
- if (m_ptr->poisoned) msg_format("%^s is more poisoned.", m_name);
- /* Was not poisoned */
+ if (m_ptr->poisoned)
+ {
+ msg_format("%^s is more poisoned.", m_name);
+ }
else
+ {
msg_format("%^s is poisoned.", m_name);
+ }
m_ptr->poisoned += dam;
}
@@ -2634,11 +2451,6 @@ void py_attack(int y, int x, int max_blow)
/* Confuse the monster */
if (r_ptr->flags3 & (RF3_NO_CONF))
{
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
msg_format("%^s is unaffected.", m_name);
}
else if (rand_int(100) < m_ptr->level)
diff --git a/src/cmd3.cc b/src/cmd3.cc
index ef0dfa28..ac27d926 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -1279,23 +1279,6 @@ static bool compare_monster_level(int w1, int w2)
return compare_monster_experience(w1, w2);
}
-/**
- * Sort by total number of kills
- */
-static bool compare_total_kills(int w1, int w2)
-{
- /* Extract total kills */
- s16b z1 = r_info[w1].r_tkills;
- s16b z2 = r_info[w2].r_tkills;
-
- /* Compare total kills */
- if (z1 < z2) return true;
- if (z1 > z2) return false;
-
- /* Punt to monster level. */
- return compare_monster_level(w1, w2);
-}
-
/*
* Sort by player kills
*/
@@ -1309,8 +1292,8 @@ static bool compare_player_kills(int w1, int w2)
if (z1 < z2) return true;
if (z1 > z2) return false;
- /* Punt to total number of kills. */
- return compare_total_kills(w1, w2);
+ /* Punt to monster level. */
+ return compare_monster_level(w1, w2);
}
@@ -1451,9 +1434,6 @@ void do_cmd_query_symbol(void)
{
monster_race *r_ptr = &r_info[i];
- /* Nothing to recall */
- if (!cheat_know && !r_ptr->r_sights) continue;
-
/* Require non-unique monsters if needed */
if (norm && (r_ptr->flags1 & (RF1_UNIQUE))) continue;
@@ -1555,7 +1535,7 @@ void do_cmd_query_symbol(void)
Term_save();
/* Recall on screen */
- screen_roff(who[i], 0, 0);
+ screen_roff(who[i], 0);
/* Hack -- Complete the prompt (again) */
Term_addstr( -1, TERM_WHITE, " [(r)ecall, ESC]");
@@ -1609,206 +1589,6 @@ void do_cmd_query_symbol(void)
/*
- * research_mon
- * -KMW-
- */
-bool_ research_mon()
-{
- int i, r_idx;
-
- char sym, query;
-
- char buf[128];
-
-
- s16b oldkills;
-
- byte oldwake;
-
- bool_ oldcheat;
-
-
- bool_ all = FALSE;
-
- bool_ uniq = FALSE;
-
- bool_ norm = FALSE;
-
- bool_ notpicked;
-
-
- bool_ recall = FALSE;
-
- monster_race *r2_ptr;
-
- /* Hack -- Remember "cheat_know" flag */
- oldcheat = cheat_know;
-
-
- /* Get a character, or abort */
- if (!get_com("Enter character of monster: ", &sym)) return (TRUE);
-
- /* Find that character info, and describe it */
- for (i = 0; ident_info[i]; ++i)
- {
- if (sym == ident_info[i][0]) break;
- }
-
- if (ident_info[i])
- {
- strnfmt(buf, 128, "%c - %s.", sym, ident_info[i] + 2);
- }
- else
- {
- strnfmt(buf, 128, "%c - %s.", sym, "Unknown Symbol");
- }
-
- /* Display the result */
- prt(buf, 16, 10);
-
-
- /* Collect matching monsters */
- std::vector<u16b> who;
- for (i = 1; i < max_r_idx; i++)
- {
- monster_race *r_ptr = &r_info[i];
-
- /* Hack -- Force "cheat_know" */
- cheat_know = TRUE;
-
- /* Nothing to recall */
- if (!cheat_know && !r_ptr->r_sights) continue;
-
- /* Require non-unique monsters if needed */
- if (norm && (r_ptr->flags1 & (RF1_UNIQUE))) continue;
-
- /* Require unique monsters if needed */
- if (uniq && !(r_ptr->flags1 & (RF1_UNIQUE))) continue;
-
- /* Collect "appropriate" monsters */
- if (all || (r_ptr->d_char == sym)) {
- who.push_back(i);
- }
- }
-
- /* Nothing to recall */
- if (who.empty())
- {
- /* Restore the "cheat_know" flag */
- cheat_know = oldcheat;
-
- return (TRUE);
- }
-
-
- query = 'y';
-
- /* Sort by level */
- std::sort(std::begin(who), std::end(who), compare_monster_level);
-
-
- /* Start at the end */
- i = who.size() - 1;
-
- notpicked = TRUE;
-
- /* Scan the monster memory */
- while (notpicked)
- {
- /* Extract a race */
- r_idx = who[i];
-
- /* Hack -- Auto-recall */
- monster_race_track(r_idx, 0);
-
- /* Hack -- Handle stuff */
- handle_stuff();
-
- /* Hack -- Begin the prompt */
- roff_top(r_idx);
-
- /* Hack -- Complete the prompt */
- Term_addstr( -1, TERM_WHITE, " [(r)ecall, ESC, space to continue]");
-
- /* Interact */
- while (1)
- {
- /* Recall */
- if (recall)
- {
- /* Save the screen */
- character_icky = TRUE;
- Term_save();
-
- /* Recall on screen */
- r2_ptr = &r_info[r_idx];
-
- oldkills = r2_ptr->r_tkills;
- oldwake = r2_ptr->r_wake;
- screen_roff(who[i], 0, 1);
- r2_ptr->r_tkills = oldkills;
- r2_ptr->r_wake = oldwake;
- r2_ptr->r_sights = 1;
- cheat_know = oldcheat;
- notpicked = FALSE;
- break;
-
- }
-
- /* Command */
- query = inkey();
-
- /* Unrecall */
- if (recall)
- {
- /* Restore */
- Term_load();
- character_icky = FALSE;
- }
-
- /* Normal commands */
- if (query != 'r') break;
-
- /* Toggle recall */
- recall = !recall;
- }
-
- /* Stop scanning */
- if (query == ESCAPE) break;
-
- /* Move to "prev" monster */
- if (query == '-')
- {
- i++;
- assert(i >= 0);
- if (static_cast<size_t>(i) == who.size())
- {
- i = 0;
- }
- }
-
- /* Move to "next" monster */
- else
- {
- if (i-- == 0)
- {
- i = who.size() - 1;
- }
- }
- }
-
-
- /* Re-display the identity */
- /* prt(buf, 5, 5);*/
-
- /* Restore the "cheat_know" flag */
- cheat_know = oldcheat;
-
- return (notpicked);
-}
-
-
-/*
* Try to "sense" the grid's mana
*/
bool_ do_cmd_sense_grid_mana()
diff --git a/src/cmd3.hpp b/src/cmd3.hpp
index 48677b77..5c664118 100644
--- a/src/cmd3.hpp
+++ b/src/cmd3.hpp
@@ -21,4 +21,3 @@ extern void do_cmd_look(void);
extern void do_cmd_locate(void);
extern void do_cmd_query_symbol(void);
extern bool_ do_cmd_sense_grid_mana(void);
-extern bool_ research_mon(void);
diff --git a/src/cmd4.cc b/src/cmd4.cc
index fa436115..27f2e46f 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -625,7 +625,6 @@ static option_type cheat_info[6] =
{ &cheat_hear, FALSE, 0, 1, "cheat_hear", "Peek into monster creation" },
{ &cheat_room, FALSE, 0, 2, "cheat_room", "Peek into dungeon creation" },
{ &cheat_xtra, FALSE, 0, 3, "cheat_xtra", "Peek into something else" },
- { &cheat_know, FALSE, 0, 4, "cheat_know", "Know complete monster info" },
{ &cheat_live, FALSE, 0, 5, "cheat_live", "Allow player to avoid death" }
};
@@ -3303,24 +3302,20 @@ static void do_cmd_knowledge_uniques(void)
{
bool_ dead = (r_ptr->max_num == 0);
- /* Only display "known" uniques */
- if (dead || cheat_know || r_ptr->r_sights)
+ /* Print a message */
+ if (dead)
{
- /* Print a message */
- if (dead)
- {
- w.write("[[[[[{}{}] [[[[[R{:<68} is dead]\n",
- static_cast<char>(conv_color[r_ptr->d_attr]),
- static_cast<char>(r_ptr->d_char),
- r_ptr->name);
- }
- else
- {
- w.write("[[[[[{}{}] [[[[[w{:<68} is alive]\n",
- static_cast<char>(conv_color[r_ptr->d_attr]),
- static_cast<char>(r_ptr->d_char),
- r_ptr->name);
- }
+ w.write("[[[[[{}{}] [[[[[R{:<68} is dead]\n",
+ static_cast<char>(conv_color[r_ptr->d_attr]),
+ static_cast<char>(r_ptr->d_char),
+ r_ptr->name);
+ }
+ else
+ {
+ w.write("[[[[[{}{}] [[[[[w{:<68} is alive]\n",
+ static_cast<char>(conv_color[r_ptr->d_attr]),
+ static_cast<char>(r_ptr->d_char),
+ r_ptr->name);
}
}
}
diff --git a/src/cmd6.cc b/src/cmd6.cc
index 24ede94f..387a236e 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -4341,15 +4341,6 @@ void do_cmd_zap_rod(void)
break;
}
- case SV_ROD_PROBING:
- {
- probing();
-
- ident = TRUE;
-
- break;
- }
-
case SV_ROD_CURING:
{
if (set_blind(0)) ident = TRUE;
@@ -5228,67 +5219,6 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item)
break;
}
- case ACT_NUMENOR:
- {
- /* Give full knowledge */
- /* Hack -- Maximal info */
- monster_race *r_ptr;
- cave_type *c_ptr;
- int x, y, m;
-
- if (!doit) return "analyze monster every 500+d200 turns";
-
- if (!tgt_pt(&x, &y)) break;
-
- c_ptr = &cave[y][x];
- if (!c_ptr->m_idx) break;
-
- r_ptr = &r_info[c_ptr->m_idx];
-
- /* Observe "maximal" attacks */
- for (m = 0; m < 4; m++)
- {
- /* Examine "actual" blows */
- if (r_ptr->blow[m].effect || r_ptr->blow[m].method)
- {
- /* Hack -- maximal observations */
- r_ptr->r_blows[m] = MAX_UCHAR;
- }
- }
-
- /* Hack -- maximal drops */
- r_ptr->r_drop_gold = r_ptr->r_drop_item =
- (((r_ptr->flags1 & (RF1_DROP_4D2)) ? 8 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_3D2)) ? 6 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_2D2)) ? 4 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_1D2)) ? 2 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_90)) ? 1 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_60)) ? 1 : 0));
-
- /* Hack -- but only "valid" drops */
- if (r_ptr->flags1 & (RF1_ONLY_GOLD)) r_ptr->r_drop_item = 0;
- if (r_ptr->flags1 & (RF1_ONLY_ITEM)) r_ptr->r_drop_gold = 0;
-
- /* Hack -- observe many spells */
- r_ptr->r_cast_inate = MAX_UCHAR;
- r_ptr->r_cast_spell = MAX_UCHAR;
-
- /* Hack -- know all the flags */
- r_ptr->r_flags1 = r_ptr->flags1;
- r_ptr->r_flags2 = r_ptr->flags2;
- r_ptr->r_flags3 = r_ptr->flags3;
- r_ptr->r_flags4 = r_ptr->flags4;
- r_ptr->r_flags5 = r_ptr->flags5;
- r_ptr->r_flags6 = r_ptr->flags6;
- r_ptr->r_flags7 = r_ptr->flags7;
- r_ptr->r_flags8 = r_ptr->flags8;
- r_ptr->r_flags9 = r_ptr->flags9;
-
- o_ptr->timeout = rand_int(200) + 500;
-
- break;
- }
-
case ACT_KNOWLEDGE:
{
if (!doit) return "whispers from beyond(sanity drain) every 100+d200 turns";
@@ -6739,10 +6669,9 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item)
case ACT_DETECT_XTRA:
{
- if (!doit) return "detection, probing and identify true every 1000 turns";
+ if (!doit) return "detection and identify true every 1000 turns";
msg_print("It glows brightly...");
detect_all(DEFAULT_RADIUS);
- probing();
identify_fully();
o_ptr->timeout = 1000;
diff --git a/src/defines.h b/src/defines.h
index bcae8ae5..fcbb5342 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -788,7 +788,6 @@
#define ACT_FUNDIN 30
#define ACT_EOL 31
#define ACT_UMBAR 32
-#define ACT_NUMENOR 33
#define ACT_KNOWLEDGE 34
#define ACT_UNDEATH 35
#define ACT_THRAIN 36
@@ -834,10 +833,6 @@
#define ACT_GANDALF 76
#define ACT_MARDA 77
#define ACT_PALANTIR 78
-/*
- 79
- 80
-*/
#define ACT_CURE_LW 81
#define ACT_CURE_MW 82
#define ACT_CURE_POISON 83
@@ -845,9 +840,6 @@
#define ACT_REST_ALL 85
#define ACT_CURE_700 86
#define ACT_CURE_1000 87
-/*
- 88
-*/
#define ACT_EREBOR 89
#define ACT_DRUEDAIN 90
#define ACT_ESP 91
@@ -1428,12 +1420,10 @@
#define SV_ROD_ILLUMINATION 4
#define SV_ROD_MAPPING 5
#define SV_ROD_DETECTION 6
-#define SV_ROD_PROBING 7
#define SV_ROD_CURING 8
#define SV_ROD_HEALING 9
#define SV_ROD_RESTORATION 10
#define SV_ROD_SPEED 11
-/* xxx (aimed) */
#define SV_ROD_TELEPORT_AWAY 13
#define SV_ROD_DISARMING 14
#define SV_ROD_LITE 15
@@ -3086,7 +3076,6 @@
#define BACT_REST 17
#define BACT_FOOD 18
#define BACT_RUMORS 19
-#define BACT_RESEARCH_MONSTER 20
#define BACT_COMPARE_WEAPONS 21
#define BACT_ENCHANT_WEAPON 23
#define BACT_ENCHANT_ARMOR 24
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 6b3ad713..32d401af 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -1637,62 +1637,39 @@ bool_ file_exist(cptr buf)
*/
static void do_lore(int r_idx, ls_flag_t flag)
{
+ byte tmp_u8 = 0;
+ u32b tmp_u32 = 0;
+ s16b tmp_s16 = 0;
monster_race *r_ptr = &r_info[r_idx];
- /* Count sights/deaths/kills */
- do_s16b(&r_ptr->r_sights, flag);
- do_s16b(&r_ptr->r_deaths, flag);
+ do_s16b(&tmp_s16, flag);
+ do_s16b(&tmp_s16, flag);
do_s16b(&r_ptr->r_pkills, flag);
- do_s16b(&r_ptr->r_tkills, flag);
-
- /* Count wakes and ignores */
- do_byte(&r_ptr->r_wake, flag);
- do_byte(&r_ptr->r_ignore, flag);
-
- /* Extra stuff */
- do_byte(&r_ptr->r_xtra1, flag);
- do_byte(&r_ptr->r_xtra2, flag);
-
- /* Count drops */
- do_byte(&r_ptr->r_drop_gold, flag);
- do_byte(&r_ptr->r_drop_item, flag);
-
- /* Count spells */
- do_byte(&r_ptr->r_cast_inate, flag);
- do_byte(&r_ptr->r_cast_spell, flag);
-
- /* Count blows of each type */
- do_byte(&r_ptr->r_blows[0], flag);
- do_byte(&r_ptr->r_blows[1], flag);
- do_byte(&r_ptr->r_blows[2], flag);
- do_byte(&r_ptr->r_blows[3], flag);
-
- /* Memorize flags */
- do_u32b(&r_ptr->r_flags1, flag); /* Just to remind you */
- do_u32b(&r_ptr->r_flags2, flag); /* flag is unrelated to */
- do_u32b(&r_ptr->r_flags3, flag); /* the other argument */
- do_u32b(&r_ptr->r_flags4, flag);
- do_u32b(&r_ptr->r_flags5, flag);
- do_u32b(&r_ptr->r_flags6, flag);
- do_u32b(&r_ptr->r_flags7, flag);
- do_u32b(&r_ptr->r_flags8, flag);
- do_u32b(&r_ptr->r_flags9, flag);
-
- /* Read the "Racial" monster tmp16b per level */
- do_s16b(&r_ptr->max_num, flag);
+ do_s16b(&tmp_s16, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_byte(&tmp_u8, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_u32b(&tmp_u32, flag);
+ do_s16b(&r_ptr->max_num, flag);
do_byte((byte*)&r_ptr->on_saved, flag);
-
- if (flag == ls_flag_t::LOAD)
- {
- /* Lore flag repair? */
- r_ptr->r_flags1 &= r_ptr->flags1;
- r_ptr->r_flags2 &= r_ptr->flags2;
- r_ptr->r_flags3 &= r_ptr->flags3;
- r_ptr->r_flags4 &= r_ptr->flags4;
- r_ptr->r_flags5 &= r_ptr->flags5;
- r_ptr->r_flags6 &= r_ptr->flags6;
- }
}
@@ -1806,7 +1783,6 @@ static void do_options(ls_flag_t flag)
cheat_hear = (c & 0x0200) ? TRUE : FALSE;
cheat_room = (c & 0x0400) ? TRUE : FALSE;
cheat_xtra = (c & 0x0800) ? TRUE : FALSE;
- cheat_know = (c & 0x1000) ? TRUE : FALSE;
cheat_live = (c & 0x2000) ? TRUE : FALSE;
}
if (flag == ls_flag_t::SAVE)
@@ -1817,7 +1793,6 @@ static void do_options(ls_flag_t flag)
if (cheat_hear) c |= 0x0200;
if (cheat_room) c |= 0x0400;
if (cheat_xtra) c |= 0x0800;
- if (cheat_know) c |= 0x1000;
if (cheat_live) c |= 0x2000;
do_u16b(&c, ls_flag_t::SAVE);
}
diff --git a/src/melee1.cc b/src/melee1.cc
index fb2b1749..2753f78c 100644
--- a/src/melee1.cc
+++ b/src/melee1.cc
@@ -232,7 +232,7 @@ bool_ carried_make_attack_normal(int r_idx)
char ddesc[80] = "your symbiote";
cptr sym_name = symbiote_name(TRUE);
- bool_ touched = FALSE, alive = TRUE;
+ bool_ alive = TRUE;
/* Not allowed to attack */
if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
@@ -246,9 +246,6 @@ bool_ carried_make_attack_normal(int r_idx)
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool_ visible = FALSE;
- bool_ obvious = FALSE;
-
int power = 0;
int damage = 0;
@@ -271,9 +268,6 @@ bool_ carried_make_attack_normal(int r_idx)
/* Handle "leaving" */
if (p_ptr->leaving) break;
- /* Extract visibility (before blink) */
- visible = TRUE;
-
/* Extract the attack "power" */
power = get_attack_power(effect);
@@ -290,9 +284,6 @@ bool_ carried_make_attack_normal(int r_idx)
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
- /* Remember the Evil-ness */
- r_ptr->r_flags3 |= (RF3_EVIL);
-
/* Message */
msg_format("%s is repelled.", sym_name);
@@ -306,9 +297,6 @@ bool_ carried_make_attack_normal(int r_idx)
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
- /* Remember the Good-ness */
- r_ptr->r_flags3 |= (RF3_GOOD);
-
/* Message */
msg_format("%s is repelled.", sym_name);
@@ -326,7 +314,6 @@ bool_ carried_make_attack_normal(int r_idx)
{
act = "hits you.";
do_cut = do_stun = 1;
- touched = TRUE;
sound(SOUND_HIT);
break;
}
@@ -334,7 +321,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_TOUCH:
{
act = "touches you.";
- touched = TRUE;
sound(SOUND_TOUCH);
break;
}
@@ -342,7 +328,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_PUNCH:
{
act = "punches you.";
- touched = TRUE;
do_stun = 1;
sound(SOUND_HIT);
break;
@@ -351,7 +336,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_KICK:
{
act = "kicks you.";
- touched = TRUE;
do_stun = 1;
sound(SOUND_HIT);
break;
@@ -360,7 +344,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_CLAW:
{
act = "claws you.";
- touched = TRUE;
do_cut = 1;
sound(SOUND_CLAW);
break;
@@ -370,7 +353,6 @@ bool_ carried_make_attack_normal(int r_idx)
{
act = "bites you.";
do_cut = 1;
- touched = TRUE;
sound(SOUND_BITE);
break;
}
@@ -378,7 +360,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_STING:
{
act = "stings you.";
- touched = TRUE;
sound(SOUND_STING);
break;
}
@@ -393,7 +374,6 @@ bool_ carried_make_attack_normal(int r_idx)
{
act = "butts you.";
do_stun = 1;
- touched = TRUE;
sound(SOUND_HIT);
break;
}
@@ -402,7 +382,6 @@ bool_ carried_make_attack_normal(int r_idx)
{
act = "crushes you.";
do_stun = 1;
- touched = TRUE;
sound(SOUND_CRUSH);
break;
}
@@ -410,7 +389,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_ENGULF:
{
act = "engulfs you.";
- touched = TRUE;
sound(SOUND_CRUSH);
break;
}
@@ -418,7 +396,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_CHARGE:
{
act = "charges you.";
- touched = TRUE;
sound(SOUND_BUY); /* Note! This is "charges", not "charges at". */
break;
}
@@ -426,7 +403,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBM_CRAWL:
{
act = "crawls on you.";
- touched = TRUE;
sound(SOUND_SLIME);
break;
}
@@ -513,9 +489,6 @@ bool_ carried_make_attack_normal(int r_idx)
if (act) msg_format("%s %s", sym_name, act);
- /* Hack -- assume all attacks are obvious */
- obvious = TRUE;
-
/* Roll out the damage */
damage = damroll(d_dice, d_side);
@@ -524,9 +497,6 @@ bool_ carried_make_attack_normal(int r_idx)
{
case 0:
{
- /* Hack -- Assume obvious */
- obvious = TRUE;
-
/* Hack -- No damage */
damage = 0;
@@ -535,9 +505,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_HURT:
{
- /* Obvious */
- obvious = TRUE;
-
/* Hack -- Player armor reduces total damage */
damage -= (damage * ((ac < 150) ? ac : 150) / 250);
@@ -550,9 +517,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_ABOMINATION:
{
- /* Obvious */
- obvious = TRUE;
-
/* Morph, but let mimicry skill have a chance to stop this */
if (magik(60 - get_skill(SKILL_MIMICRY)))
{
@@ -572,8 +536,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_SANITY:
{
- obvious = TRUE;
-
take_sanity_hit(damage, ddesc);
break;
}
@@ -587,10 +549,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Take "poison" effect */
if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
{
- if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5))
- {
- obvious = TRUE;
- }
+ set_poisoned(p_ptr->poisoned + randint(rlev) + 5);
}
break;
@@ -606,7 +565,7 @@ bool_ carried_make_attack_normal(int r_idx)
if (!p_ptr->resist_disen)
{
/* Apply disenchantment */
- if (apply_disenchant(0)) obvious = TRUE;
+ apply_disenchant(0);
}
break;
@@ -654,9 +613,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_ACID:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are covered in acid!");
@@ -669,9 +625,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_ELEC:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are struck by electricity!");
@@ -685,9 +638,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_FIRE:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are enveloped in flames!");
@@ -701,9 +651,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_COLD:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are covered with frost!");
@@ -724,10 +671,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Increase "blind" */
if (!p_ptr->resist_blind)
{
- if (set_blind(p_ptr->blind + 10 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_blind(p_ptr->blind + 10 + randint(rlev));
}
@@ -743,10 +687,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Increase "confused" */
if (!p_ptr->resist_conf)
{
- if (set_confused(p_ptr->confused + 3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_confused(p_ptr->confused + 3 + randint(rlev));
}
@@ -763,19 +704,14 @@ bool_ carried_make_attack_normal(int r_idx)
if (p_ptr->resist_fear)
{
msg_print("You stand your ground!");
- obvious = TRUE;
}
else if (rand_int(100) < p_ptr->skill_sav)
{
msg_print("You stand your ground!");
- obvious = TRUE;
}
else
{
- if (set_afraid(p_ptr->afraid + 3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_afraid(p_ptr->afraid + 3 + randint(rlev));
}
@@ -795,19 +731,14 @@ bool_ carried_make_attack_normal(int r_idx)
if (p_ptr->free_act)
{
msg_print("You are unaffected!");
- obvious = TRUE;
}
else if (rand_int(100) < p_ptr->skill_sav)
{
msg_print("You resist the effects!");
- obvious = TRUE;
}
else
{
- if (set_paralyzed(3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_paralyzed(3 + randint(rlev));
}
@@ -821,7 +752,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_STR, STAT_DEC_NORMAL);
break;
}
@@ -833,7 +764,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_INT, STAT_DEC_NORMAL);
break;
}
@@ -845,7 +776,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_WIS, STAT_DEC_NORMAL);
break;
}
@@ -857,7 +788,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_DEX, STAT_DEC_NORMAL);
break;
}
@@ -869,7 +800,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_CON, STAT_DEC_NORMAL);
break;
}
@@ -881,7 +812,7 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_CHR, STAT_DEC_NORMAL);
break;
}
@@ -893,21 +824,18 @@ bool_ carried_make_attack_normal(int r_idx)
take_hit(damage, ddesc);
/* Damage (stats) */
- if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_STR, STAT_DEC_NORMAL);
+ do_dec_stat(A_DEX, STAT_DEC_NORMAL);
+ do_dec_stat(A_CON, STAT_DEC_NORMAL);
+ do_dec_stat(A_INT, STAT_DEC_NORMAL);
+ do_dec_stat(A_WIS, STAT_DEC_NORMAL);
+ do_dec_stat(A_CHR, STAT_DEC_NORMAL);
break;
}
case RBE_SHATTER:
{
- /* Obvious */
- obvious = TRUE;
-
/* Hack -- Reduce damage based on the player armor class */
damage -= (damage * ((ac < 150) ? ac : 150) / 250);
@@ -928,9 +856,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_EXP_10:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
carried_monster_hit = TRUE;
take_hit(damage, ddesc);
@@ -958,9 +883,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_EXP_20:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
carried_monster_hit = TRUE;
take_hit(damage, ddesc);
@@ -988,9 +910,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_EXP_40:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
carried_monster_hit = TRUE;
take_hit(damage, ddesc);
@@ -1018,9 +937,6 @@ bool_ carried_make_attack_normal(int r_idx)
case RBE_EXP_80:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
carried_monster_hit = TRUE;
take_hit(damage, ddesc);
@@ -1055,10 +971,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Take "poison" effect */
if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
{
- if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5))
- {
- obvious = TRUE;
- }
+ set_poisoned(p_ptr->poisoned + randint(rlev) + 5);
}
/* Damage CON (10% chance)*/
@@ -1066,16 +979,13 @@ bool_ carried_make_attack_normal(int r_idx)
{
/* 1% chance for perm. damage */
bool_ perm = (randint(10) == 1);
- if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE;
+ dec_stat(A_CON, randint(10), perm);
}
break;
}
case RBE_PARASITE:
{
- /* Obvious */
- obvious = TRUE;
-
if (!p_ptr->parasite) set_parasite(damage, r_idx);
break;
@@ -1088,10 +998,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Increase "image" */
if (!p_ptr->resist_chaos)
{
- if (set_image(p_ptr->image + 3 + randint(rlev / 2)))
- {
- obvious = TRUE;
- }
+ set_image(p_ptr->image + 3 + randint(rlev / 2));
}
break;
@@ -1265,20 +1172,6 @@ bool_ carried_make_attack_normal(int r_idx)
/* Apply the stun */
if (k) (void)set_stun(p_ptr->stun + k);
}
-
- if (touched)
- {
- if (p_ptr->sh_fire && alive)
- {
- r_ptr->r_flags3 |= RF3_IM_FIRE;
- }
-
- if (p_ptr->sh_elec && alive)
- {
- r_ptr->r_flags3 |= RF3_IM_ELEC;
- }
- touched = FALSE;
- }
}
/* Monster missed player */
@@ -1309,21 +1202,6 @@ bool_ carried_make_attack_normal(int r_idx)
break;
}
}
-
-
- /* Analyze "visible" monsters only */
- if (visible)
- {
- /* Count "obvious" attacks (and ones that cause damage) */
- if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10))
- {
- /* Count attacks of this type */
- if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR)
- {
- r_ptr->r_blows[ap_cnt]++;
- }
- }
- }
}
/* Assume we attacked */
return (TRUE);
@@ -1403,9 +1281,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Scan through all four blows */
for (ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool_ visible = FALSE;
- bool_ obvious = FALSE;
-
int power = 0;
int damage = 0;
@@ -1428,9 +1303,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Handle "leaving" */
if (p_ptr->leaving) break;
- /* Extract visibility (before blink) */
- if (m_ptr->ml) visible = TRUE;
-
/* Extract the attack "power" */
switch (effect)
{
@@ -1565,9 +1437,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
if ((randint(100000) < chance) && (r_ptr->flags3 & (RF3_EVIL)))
{
- /* Remember the Evil-ness */
- r_ptr->r_flags3 |= (RF3_EVIL);
-
/* Message */
msg_format("The hand of Eru Iluvatar stops %s blow.", m_name);
@@ -1582,12 +1451,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
- /* Remember the Evil-ness */
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_EVIL);
- }
-
/* Message */
msg_format("%^s is repelled.", m_name);
@@ -1601,12 +1464,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
- /* Remember the Good-ness */
- if (m_ptr->ml)
- {
- r_ptr->r_flags3 |= (RF3_GOOD);
- }
-
/* Message */
msg_format("%^s is repelled.", m_name);
@@ -1832,9 +1689,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
black_breath_attack(450 - m_ptr->level);
}
- /* Hack -- assume all attacks are obvious */
- obvious = TRUE;
-
/* Roll out the damage */
damage = damroll(d_dice, d_side);
@@ -1846,9 +1700,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
{
case 0:
{
- /* Hack -- Assume obvious */
- obvious = TRUE;
-
/* Hack -- No damage */
damage = 0;
@@ -1857,9 +1708,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_HURT:
{
- /* Obvious */
- obvious = TRUE;
-
/* Hack -- Player armor reduces total damage */
damage -= (damage * ((ac < 150) ? ac : 150) / 250);
@@ -1871,9 +1719,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_ABOMINATION:
{
- /* Obvious */
- obvious = TRUE;
-
/* Morph, but let mimicry skill have a chance to stop this */
if (magik(60 - get_skill(SKILL_MIMICRY)))
{
@@ -1893,8 +1738,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_SANITY:
{
- obvious = TRUE;
-
take_sanity_hit(damage, ddesc);
break;
}
@@ -1907,10 +1750,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Take "poison" effect */
if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
{
- if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5))
- {
- obvious = TRUE;
- }
+ set_poisoned(p_ptr->poisoned + randint(rlev) + 5);
}
/* Learn about the player */
@@ -1927,8 +1767,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Allow complete resist */
if (!p_ptr->resist_disen)
{
- /* Apply disenchantment */
- if (apply_disenchant(0)) obvious = TRUE;
+ apply_disenchant(0);
}
/* Learn about the player */
@@ -1964,9 +1803,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Message */
msg_print("Energy drains from your pack!");
- /* Obvious */
- obvious = TRUE;
-
/* Heal */
j = rlev;
m_ptr->hp += j * o_ptr->pval * o_ptr->number;
@@ -1997,9 +1833,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Take some damage */
take_hit(damage, ddesc);
- /* Obvious */
- obvious = TRUE;
-
/* Saving throw (unless paralyzed) based on dex and level */
if (!p_ptr->paralyzed &&
(rand_int(100) < (adj_dex_safe[p_ptr->stat_ind[A_DEX]] +
@@ -2082,9 +1915,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Occasional "blink" anyway */
blinked = TRUE;
- /* Obvious */
- obvious = TRUE;
-
/* Done */
break;
}
@@ -2157,9 +1987,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Steal the items */
inc_stack_size_ex(i, -1, OPTIMIZE, NO_DESCRIBE);
- /* Obvious */
- obvious = TRUE;
-
/* Blink away */
blinked = TRUE;
@@ -2201,9 +2028,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Steal the items */
inc_stack_size_ex(i, -1, OPTIMIZE, NO_DESCRIBE);
- /* Obvious */
- obvious = TRUE;
-
/* Done */
break;
}
@@ -2230,7 +2054,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
if (!p_ptr->blind)
{
msg_print("Your light dims.");
- obvious = TRUE;
}
/* Window stuff */
@@ -2242,9 +2065,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_ACID:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are covered in acid!");
@@ -2259,9 +2079,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_ELEC:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are struck by electricity!");
@@ -2276,9 +2093,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_FIRE:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are enveloped in flames!");
@@ -2293,9 +2107,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_COLD:
{
- /* Obvious */
- obvious = TRUE;
-
/* Message */
msg_print("You are covered with frost!");
@@ -2316,10 +2127,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Increase "blind" */
if (!p_ptr->resist_blind)
{
- if (set_blind(p_ptr->blind + 10 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_blind(p_ptr->blind + 10 + randint(rlev));
}
/* Learn about the player */
@@ -2336,10 +2144,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Increase "confused" */
if (!p_ptr->resist_conf)
{
- if (set_confused(p_ptr->confused + 3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_confused(p_ptr->confused + 3 + randint(rlev));
}
/* Learn about the player */
@@ -2357,19 +2162,14 @@ bool_ make_attack_normal(int m_idx, byte divis)
if (p_ptr->resist_fear)
{
msg_print("You stand your ground!");
- obvious = TRUE;
}
else if (rand_int(100) < p_ptr->skill_sav)
{
msg_print("You stand your ground!");
- obvious = TRUE;
}
else
{
- if (set_afraid(p_ptr->afraid + 3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_afraid(p_ptr->afraid + 3 + randint(rlev));
}
/* Learn about the player */
@@ -2390,19 +2190,14 @@ bool_ make_attack_normal(int m_idx, byte divis)
if (p_ptr->free_act)
{
msg_print("You are unaffected!");
- obvious = TRUE;
}
else if (rand_int(100) < p_ptr->skill_sav)
{
msg_print("You resist the effects!");
- obvious = TRUE;
}
else
{
- if (set_paralyzed(3 + randint(rlev)))
- {
- obvious = TRUE;
- }
+ set_paralyzed(3 + randint(rlev));
}
/* Learn about the player */
@@ -2417,7 +2212,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_STR, STAT_DEC_NORMAL);
break;
}
@@ -2428,7 +2223,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_INT, STAT_DEC_NORMAL);
break;
}
@@ -2439,7 +2234,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_WIS, STAT_DEC_NORMAL);
break;
}
@@ -2450,7 +2245,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_DEX, STAT_DEC_NORMAL);
break;
}
@@ -2461,7 +2256,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_CON, STAT_DEC_NORMAL);
break;
}
@@ -2472,7 +2267,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stat) */
- if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_CHR, STAT_DEC_NORMAL);
break;
}
@@ -2483,21 +2278,18 @@ bool_ make_attack_normal(int m_idx, byte divis)
take_hit(damage, ddesc);
/* Damage (stats) */
- if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE;
- if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE;
+ do_dec_stat(A_STR, STAT_DEC_NORMAL);
+ do_dec_stat(A_DEX, STAT_DEC_NORMAL);
+ do_dec_stat(A_CON, STAT_DEC_NORMAL);
+ do_dec_stat(A_INT, STAT_DEC_NORMAL);
+ do_dec_stat(A_WIS, STAT_DEC_NORMAL);
+ do_dec_stat(A_CHR, STAT_DEC_NORMAL);
break;
}
case RBE_SHATTER:
{
- /* Obvious */
- obvious = TRUE;
-
/* Hack -- Reduce damage based on the player armor class */
damage -= (damage * ((ac < 150) ? ac : 150) / 250);
@@ -2517,9 +2309,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_EXP_10:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
take_hit(damage, ddesc);
@@ -2546,9 +2335,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_EXP_20:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
take_hit(damage, ddesc);
@@ -2575,9 +2361,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_EXP_40:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
take_hit(damage, ddesc);
@@ -2604,9 +2387,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
case RBE_EXP_80:
{
- /* Obvious */
- obvious = TRUE;
-
/* Take damage */
take_hit(damage, ddesc);
@@ -2639,10 +2419,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Take "poison" effect */
if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
{
- if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5))
- {
- obvious = TRUE;
- }
+ set_poisoned(p_ptr->poisoned + randint(rlev) + 5);
}
/* Damage CON (10% chance)*/
@@ -2650,7 +2427,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
{
/* 1% chance for perm. damage */
bool_ perm = (randint(10) == 1);
- if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE;
+ dec_stat(A_CON, randint(10), perm);
}
break;
@@ -2663,10 +2440,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Increase "image" */
if (!p_ptr->resist_chaos)
{
- if (set_image(p_ptr->image + 3 + randint(rlev / 2)))
- {
- obvious = TRUE;
- }
+ set_image(p_ptr->image + 3 + randint(rlev / 2));
}
/* Learn about the player */
@@ -2745,9 +2519,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
}
case RBE_PARASITE:
{
- /* Obvious */
- obvious = TRUE;
-
if (!p_ptr->parasite) set_parasite(damage, m_ptr->r_idx);
break;
@@ -2877,11 +2648,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
alive = FALSE;
}
}
- else
- {
- if (m_ptr->ml)
- r_ptr->r_flags3 |= RF3_IM_FIRE;
- }
}
if (p_ptr->sh_elec && alive)
@@ -2896,12 +2662,8 @@ bool_ make_attack_normal(int m_idx, byte divis)
alive = FALSE;
}
}
- else
- {
- if (m_ptr->ml)
- r_ptr->r_flags3 |= RF3_IM_ELEC;
- }
}
+
if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_COUNTER) && alive)
{
msg_format("%^s gets bashed by your mystic shield!", m_name);
@@ -2912,6 +2674,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
alive = FALSE;
}
}
+
if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_FIRE) && alive)
{
if (!(r_ptr->flags3 & RF3_IM_FIRE))
@@ -2924,12 +2687,8 @@ bool_ make_attack_normal(int m_idx, byte divis)
alive = FALSE;
}
}
- else
- {
- if (m_ptr->ml)
- r_ptr->r_flags3 |= RF3_IM_FIRE;
- }
}
+
if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_GREAT_FIRE) && alive)
{
msg_format("%^s gets burned by your fiery shield!", m_name);
@@ -2940,6 +2699,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
alive = FALSE;
}
}
+
if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_FEAR) && alive)
{
int tmp;
@@ -2993,21 +2753,6 @@ bool_ make_attack_normal(int m_idx, byte divis)
break;
}
}
-
-
- /* Analyze "visible" monsters only */
- if (visible)
- {
- /* Count "obvious" attacks (and ones that cause damage) */
- if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10))
- {
- /* Count attacks of this type */
- if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR)
- {
- r_ptr->r_blows[ap_cnt]++;
- }
- }
- }
}
@@ -3018,13 +2763,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
teleport_away(m_idx, MAX_SIGHT * 2 + 5);
}
-
- /* Always notice cause of death */
- if (death && (r_ptr->r_deaths < MAX_SHORT))
- {
- r_ptr->r_deaths++;
- }
-
+ /* Fear */
if (m_ptr->ml && fear)
{
sound (SOUND_FLEE);
diff --git a/src/melee2.cc b/src/melee2.cc
index e4f0802a..080208f1 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -1712,12 +1712,6 @@ static bool_ monst_spell_monst(int m_idx)
(tr_ptr->flags3 & (RF3_NO_CONF)) ||
(t_ptr->level > randint((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
{
- /* Memorize a flag */
- if (tr_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) tr_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* No obvious effect */
if (see_t)
{
@@ -1756,11 +1750,6 @@ static bool_ monst_spell_monst(int m_idx)
(tr_ptr->flags3 & (RF3_NO_CONF)) ||
(t_ptr->level > randint((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
{
- /* Memorize a flag */
- if (tr_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) tr_ptr->r_flags3 |= (RF3_NO_CONF);
- }
/* No obvious effect */
if (see_t)
{
@@ -2296,7 +2285,6 @@ static bool_ monst_spell_monst(int m_idx)
{
if (see_t)
{
- tr_ptr->r_flags3 |= RF3_RES_TELE;
monster_msg("%^s is unaffected!", t_name);
}
resists_tele = TRUE;
@@ -2305,7 +2293,6 @@ static bool_ monst_spell_monst(int m_idx)
{
if (see_t)
{
- tr_ptr->r_flags3 |= RF3_RES_TELE;
monster_msg("%^s resists!", t_name);
}
resists_tele = TRUE;
@@ -2713,39 +2700,6 @@ static bool_ monst_spell_monst(int m_idx)
t_ptr->csleep = 0;
}
-
- /* Remember what the monster did, if we saw it */
- if (seen)
- {
- /* Inate spell */
- if (thrown_spell < 32*4)
- {
- r_ptr->r_flags4 |= (1L << (thrown_spell - 32 * 3));
- if (r_ptr->r_cast_inate < MAX_UCHAR) r_ptr->r_cast_inate++;
- }
-
- /* Bolt or Ball */
- else if (thrown_spell < 32*5)
- {
- r_ptr->r_flags5 |= (1L << (thrown_spell - 32 * 4));
- if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
- }
-
- /* Special spell */
- else if (thrown_spell < 32*6)
- {
- r_ptr->r_flags6 |= (1L << (thrown_spell - 32 * 5));
- if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
- }
- }
-
- /* Always take note of monsters that kill you ---
- * even accidentally */
- if (death && (r_ptr->r_deaths < MAX_SHORT))
- {
- r_ptr->r_deaths++;
- }
-
/* A spell was cast */
return (TRUE);
}
@@ -4554,38 +4508,6 @@ static bool_ make_attack_spell(int m_idx)
}
}
- /* Remember what the monster did to us */
- if (seen)
- {
- /* Inate spell */
- if (thrown_spell < 32*4)
- {
- r_ptr->r_flags4 |= (1L << (thrown_spell - 32 * 3));
- if (r_ptr->r_cast_inate < MAX_UCHAR) r_ptr->r_cast_inate++;
- }
-
- /* Bolt or Ball */
- else if (thrown_spell < 32*5)
- {
- r_ptr->r_flags5 |= (1L << (thrown_spell - 32 * 4));
- if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
- }
-
- /* Special spell */
- else if (thrown_spell < 32*6)
- {
- r_ptr->r_flags6 |= (1L << (thrown_spell - 32 * 5));
- if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
- }
- }
-
-
- /* Always take note of monsters that kill you */
- if (death && (r_ptr->r_deaths < MAX_SHORT))
- {
- r_ptr->r_deaths++;
- }
-
/* A spell was cast */
return (TRUE);
}
@@ -5449,9 +5371,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
/* Scan through all four blows */
for (int ap_cnt = 0; ap_cnt < 4; ap_cnt++)
{
- bool_ visible = FALSE;
- bool_ obvious = FALSE;
-
int power = 0;
int damage = 0;
@@ -5482,9 +5401,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
/* break; */
}
- /* Extract visibility (before blink) */
- if (m_ptr->ml) visible = TRUE;
-
/* Extract the attack "power" */
power = get_attack_power(effect);
@@ -5680,9 +5596,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
}
- /* Hack -- assume all attacks are obvious */
- obvious = TRUE;
-
/* Roll out the damage */
damage = damroll(d_dice, d_side);
@@ -5846,8 +5759,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
{
blinked = FALSE;
monster_msg("%^s is suddenly very hot!", m_name);
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_FIRE;
}
project(t_idx, 0, m_ptr->fy, m_ptr->fx,
damroll (1 + ((t_ptr->level) / 26),
@@ -5862,8 +5773,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
{
blinked = FALSE;
monster_msg("%^s gets zapped!", m_name);
- if (t_ptr->ml)
- tr_ptr->r_flags2 |= RF2_AURA_ELEC;
}
project(t_idx, 0, m_ptr->fy, m_ptr->fx,
damroll (1 + ((t_ptr->level) / 26),
@@ -5908,21 +5817,6 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
}
}
}
-
-
- /* Analyze "visible" monsters only */
- if (visible)
- {
- /* Count "obvious" attacks (and ones that cause damage) */
- if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10))
- {
- /* Count attacks of this type */
- if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR)
- {
- r_ptr->r_blows[ap_cnt]++;
- }
- }
- }
}
if (explode)
@@ -6137,18 +6031,7 @@ static void process_monster(int m_idx, bool_ is_frien)
{
/* Monster wakes up "a little bit" */
m_ptr->csleep -= d;
-
- /* Notice the "not waking up" */
- if (m_ptr->ml)
- {
- /* Hack -- Count the ignores */
- if (r_ptr->r_ignore < MAX_UCHAR)
- {
- r_ptr->r_ignore++;
- }
- }
}
-
/* Just woke up */
else
{
@@ -6165,12 +6048,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Dump a message */
msg_format("%^s wakes up.", m_name);
-
- /* Hack -- Count the wakings */
- if (r_ptr->r_wake < MAX_UCHAR)
- {
- r_ptr->r_wake++;
- }
}
}
}
@@ -6399,10 +6276,6 @@ static void process_monster(int m_idx, bool_ is_frien)
(r_ptr->flags1 & (RF1_RAND_25)) &&
(rand_int(100) < 75))
{
- /* Memorize flags */
- if (m_ptr->ml) r_ptr->r_flags1 |= (RF1_RAND_50);
- if (m_ptr->ml) r_ptr->r_flags1 |= (RF1_RAND_25);
-
/* Try four "random" directions */
mm[0] = mm[1] = mm[2] = mm[3] = 5;
}
@@ -6411,9 +6284,6 @@ static void process_monster(int m_idx, bool_ is_frien)
else if ((r_ptr->flags1 & (RF1_RAND_50)) &&
(rand_int(100) < 50))
{
- /* Memorize flags */
- if (m_ptr->ml) r_ptr->r_flags1 |= (RF1_RAND_50);
-
/* Try four "random" directions */
mm[0] = mm[1] = mm[2] = mm[3] = 5;
}
@@ -6422,9 +6292,6 @@ static void process_monster(int m_idx, bool_ is_frien)
else if ((r_ptr->flags1 & (RF1_RAND_25)) &&
(rand_int(100) < 25))
{
- /* Memorize flags */
- if (m_ptr->ml) r_ptr->r_flags1 |= (RF1_RAND_25);
-
/* Try four "random" directions */
mm[0] = mm[1] = mm[2] = mm[3] = 5;
}
@@ -6448,12 +6315,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Assume nothing */
bool_ did_open_door = FALSE;
bool_ did_bash_door = FALSE;
- bool_ did_take_item = FALSE;
- bool_ did_kill_item = FALSE;
- bool_ did_move_body = FALSE;
- bool_ did_kill_body = FALSE;
- bool_ did_pass_wall = FALSE;
- bool_ did_kill_wall = FALSE;
/* Take a zero-terminated array of "directions" */
for (i = 0; mm[i]; i++)
@@ -6566,9 +6427,6 @@ static void process_monster(int m_idx, bool_ is_frien)
{
/* Pass through walls/doors/rubble */
do_move = TRUE;
-
- /* Monster went through a wall */
- did_pass_wall = TRUE;
}
/* Monster destroys walls (and doors) */
@@ -6577,9 +6435,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Eat through walls/doors/rubble */
do_move = TRUE;
- /* Monster destroyed a wall */
- did_kill_wall = TRUE;
-
if (randint(GRINDNOISE) == 1)
{
msg_print("There is a grinding sound.");
@@ -6600,9 +6455,6 @@ static void process_monster(int m_idx, bool_ is_frien)
{
/* Pass through walls/doors/rubble */
do_move = TRUE;
-
- /* Monster went through a wall */
- did_pass_wall = TRUE;
}
/* Monster moves through webs */
@@ -6843,11 +6695,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Allow movement */
do_move = TRUE;
- /* Monster ate another monster */
- did_kill_body = TRUE;
-
- /* XXX XXX XXX Message */
-
/* Kill the monster */
delete_monster(ny, nx);
@@ -6879,11 +6726,6 @@ static void process_monster(int m_idx, bool_ is_frien)
{
/* Allow movement */
do_move = TRUE;
-
- /* Monster pushed past another monster */
- did_move_body = TRUE;
-
- /* XXX XXX XXX Message */
}
}
@@ -7044,9 +6886,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Only give a message for "take_item" */
if (r_ptr->flags2 & (RF2_TAKE_ITEM))
{
- /* Take note */
- did_take_item = TRUE;
-
/* Describe observable situations */
if (m_ptr->ml && player_has_los_bold(ny, nx))
{
@@ -7060,9 +6899,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Pick up the item */
else if (r_ptr->flags2 & (RF2_TAKE_ITEM))
{
- /* Take note */
- did_take_item = TRUE;
-
/* Describe observable situations */
if (player_has_los_bold(ny, nx))
{
@@ -7092,9 +6928,6 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Destroy the item */
else
{
- /* Take note */
- did_kill_item = TRUE;
-
/* Describe observable situations */
if (player_has_los_bold(ny, nx))
{
@@ -7135,35 +6968,6 @@ static void process_monster(int m_idx, bool_ is_frien)
}
- /* Learn things from observable monster */
- if (m_ptr->ml)
- {
- /* Monster opened a door */
- if (did_open_door) r_ptr->r_flags2 |= (RF2_OPEN_DOOR);
-
- /* Monster bashed a door */
- if (did_bash_door) r_ptr->r_flags2 |= (RF2_BASH_DOOR);
-
- /* Monster tried to pick something up */
- if (did_take_item) r_ptr->r_flags2 |= (RF2_TAKE_ITEM);
-
- /* Monster tried to crush something */
- if (did_kill_item) r_ptr->r_flags2 |= (RF2_KILL_ITEM);
-
- /* Monster pushed past another monster */
- if (did_move_body) r_ptr->r_flags2 |= (RF2_MOVE_BODY);
-
- /* Monster ate another monster */
- if (did_kill_body) r_ptr->r_flags2 |= (RF2_KILL_BODY);
-
- /* Monster passed through a wall */
- if (did_pass_wall) r_ptr->r_flags2 |= (RF2_PASS_WALL);
-
- /* Monster destroyed a wall */
- if (did_kill_wall) r_ptr->r_flags2 |= (RF2_KILL_WALL);
- }
-
-
/* Hack -- get "bold" if out of options */
if (!do_turn && !do_move && m_ptr->monfear)
{
@@ -7270,56 +7074,10 @@ void process_monsters(void)
monster_type *m_ptr;
- int old_monster_race_idx;
-
- u32b old_r_flags1 = 0L;
- u32b old_r_flags2 = 0L;
- u32b old_r_flags3 = 0L;
- u32b old_r_flags4 = 0L;
- u32b old_r_flags5 = 0L;
- u32b old_r_flags6 = 0L;
-
- byte old_r_blows0 = 0;
- byte old_r_blows1 = 0;
- byte old_r_blows2 = 0;
- byte old_r_blows3 = 0;
-
- byte old_r_cast_inate = 0;
- byte old_r_cast_spell = 0;
-
/* Check the doppleganger */
if (doppleganger && !(r_info[m_list[doppleganger].r_idx].flags9 & RF9_DOPPLEGANGER))
doppleganger = 0;
- /* Memorize old race */
- old_monster_race_idx = monster_race_idx;
-
- /* Acquire knowledge */
- if (monster_race_idx)
- {
- /* Acquire current monster */
- monster_race *r_ptr = &r_info[monster_race_idx];
-
- /* Memorize flags */
- old_r_flags1 = r_ptr->r_flags1;
- old_r_flags2 = r_ptr->r_flags2;
- old_r_flags3 = r_ptr->r_flags3;
- old_r_flags4 = r_ptr->r_flags4;
- old_r_flags5 = r_ptr->r_flags5;
- old_r_flags6 = r_ptr->r_flags6;
-
- /* Memorize blows */
- old_r_blows0 = r_ptr->r_blows[0];
- old_r_blows1 = r_ptr->r_blows[1];
- old_r_blows2 = r_ptr->r_blows[2];
- old_r_blows3 = r_ptr->r_blows[3];
-
- /* Memorize castings */
- old_r_cast_inate = r_ptr->r_cast_inate;
- old_r_cast_spell = r_ptr->r_cast_spell;
- }
-
-
/* Hack -- calculate the "player noise" */
noise = (1L << (30 - p_ptr->skill_stl));
@@ -7447,30 +7205,4 @@ void process_monsters(void)
/* Reset global index */
hack_m_idx = 0;
-
-
- /* Tracking a monster race (the same one we were before) */
- if (monster_race_idx && (monster_race_idx == old_monster_race_idx))
- {
- /* Acquire monster race */
- monster_race *r_ptr = &r_info[monster_race_idx];
-
- /* Check for knowledge change */
- if ((old_r_flags1 != r_ptr->r_flags1) ||
- (old_r_flags2 != r_ptr->r_flags2) ||
- (old_r_flags3 != r_ptr->r_flags3) ||
- (old_r_flags4 != r_ptr->r_flags4) ||
- (old_r_flags5 != r_ptr->r_flags5) ||
- (old_r_flags6 != r_ptr->r_flags6) ||
- (old_r_blows0 != r_ptr->r_blows[0]) ||
- (old_r_blows1 != r_ptr->r_blows[1]) ||
- (old_r_blows2 != r_ptr->r_blows[2]) ||
- (old_r_blows3 != r_ptr->r_blows[3]) ||
- (old_r_cast_inate != r_ptr->r_cast_inate) ||
- (old_r_cast_spell != r_ptr->r_cast_spell))
- {
- /* Window stuff */
- p_ptr->window |= (PW_MONSTER);
- }
- }
}
diff --git a/src/monster1.cc b/src/monster1.cc
index 4e3e2c42..b1570382 100644
--- a/src/monster1.cc
+++ b/src/monster1.cc
@@ -33,63 +33,6 @@ static cptr wd_his[3] = { "its", "his", "her" };
-
-
-
-/*
- * Determine if the "armor" is known
- * The higher the level, the fewer kills needed.
- */
-static bool_ know_armour(std::shared_ptr<monster_race const> r_ptr)
-{
- s32b level = r_ptr->level;
-
- s32b kills = r_ptr->r_tkills;
-
- /* Normal monsters */
- if (kills > 304 / (4 + level)) return (TRUE);
-
- /* Skip non-uniques */
- if (!(r_ptr->flags1 & (RF1_UNIQUE))) return (FALSE);
-
- /* Unique monsters */
- if (kills > 304 / (38 + (5*level) / 4)) return (TRUE);
-
- /* Assume false */
- return (FALSE);
-}
-
-
-/*
- * Determine if the "damage" of the given attack is known
- * the higher the level of the monster, the fewer the attacks you need,
- * the more damage an attack does, the more attacks you need
- */
-static bool_ know_damage(std::shared_ptr<monster_race const> r_ptr, int i)
-{
- s32b level = r_ptr->level;
-
- s32b a = r_ptr->r_blows[i];
-
- s32b d1 = r_ptr->blow[i].d_dice;
- s32b d2 = r_ptr->blow[i].d_side;
-
- s32b d = d1 * d2;
-
- /* Normal monsters */
- if ((4 + level) * a > 80 * d) return (TRUE);
-
- /* Skip non-uniques */
- if (!(r_ptr->flags1 & (RF1_UNIQUE))) return (FALSE);
-
- /* Unique monsters */
- if ((4 + level) * (2 * a) > 80 * d) return (TRUE);
-
- /* Assume false */
- return (FALSE);
-}
-
-
/*
* Hack -- display monster information using "text_out()"
*
@@ -102,7 +45,7 @@ static bool_ know_damage(std::shared_ptr<monster_race const> r_ptr, int i)
* left edge of the screen, on a cleared line, in which the recall is
* to take place. One extra blank line is left after the recall.
*/
-static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
+static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
{
bool_ old = FALSE;
bool_ sin = FALSE;
@@ -111,194 +54,43 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
cptr p, q;
- int msex = 0;
-
bool_ breath = FALSE;
bool_ magic = FALSE;
- u32b flags1;
- u32b flags2;
- u32b flags3;
- u32b flags4;
- u32b flags5;
- u32b flags6;
- u32b flags7;
- u32b flags9;
-
int vn = 0;
byte color[64];
cptr vp[64];
- monster_race save_mem;
+ /* Shorthand */
+ u32b const flags1 = r_ptr->flags1;
+ u32b const flags2 = r_ptr->flags2;
+ u32b const flags3 = r_ptr->flags3;
+ u32b const flags4 = r_ptr->flags4;
+ u32b const flags5 = r_ptr->flags5;
+ u32b const flags6 = r_ptr->flags6;
+ u32b const flags7 = r_ptr->flags7;
+ u32b const flags9 = r_ptr->flags9;
- /* Cheat -- Know everything */
- if (cheat_know)
+ /* Extract a gender (if applicable) */
+ int msex = 0;
+ if (flags1 & (RF1_FEMALE))
{
- /* XXX XXX XXX */
-
- /* Save the "old" memory */
- save_mem = *r_ptr;
-
- /* Hack -- Maximal kills */
- r_ptr->r_tkills = MAX_SHORT;
-
- /* Hack -- Maximal info */
- r_ptr->r_wake = r_ptr->r_ignore = MAX_UCHAR;
-
- /* Observe "maximal" attacks */
- for (m = 0; m < 4; m++)
- {
- /* Examine "actual" blows */
- if (r_ptr->blow[m].effect || r_ptr->blow[m].method)
- {
- /* Hack -- maximal observations */
- r_ptr->r_blows[m] = MAX_UCHAR;
- }
- }
-
- /* Hack -- maximal drops */
- r_ptr->r_drop_gold = r_ptr->r_drop_item =
- (((r_ptr->flags1 & (RF1_DROP_4D2)) ? 8 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_3D2)) ? 6 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_2D2)) ? 4 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_1D2)) ? 2 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_90)) ? 1 : 0) +
- ((r_ptr->flags1 & (RF1_DROP_60)) ? 1 : 0));
-
- /* Hack -- but only "valid" drops */
- if (r_ptr->flags1 & (RF1_ONLY_GOLD)) r_ptr->r_drop_item = 0;
- if (r_ptr->flags1 & (RF1_ONLY_ITEM)) r_ptr->r_drop_gold = 0;
-
- /* Hack -- observe many spells */
- r_ptr->r_cast_inate = MAX_UCHAR;
- r_ptr->r_cast_spell = MAX_UCHAR;
-
- /* Hack -- know all the flags */
- r_ptr->r_flags1 = r_ptr->flags1;
- r_ptr->r_flags2 = r_ptr->flags2;
- r_ptr->r_flags3 = r_ptr->flags3;
- r_ptr->r_flags4 = r_ptr->flags4;
- r_ptr->r_flags5 = r_ptr->flags5;
- r_ptr->r_flags6 = r_ptr->flags6;
- r_ptr->r_flags7 = r_ptr->flags7;
- r_ptr->r_flags8 = r_ptr->flags8;
- r_ptr->r_flags9 = r_ptr->flags9;
+ msex = 2;
}
-
-
- /* Extract a gender (if applicable) */
- if (r_ptr->flags1 & (RF1_FEMALE)) msex = 2;
- else if (r_ptr->flags1 & (RF1_MALE)) msex = 1;
-
-
- /* Obtain a copy of the "known" flags */
- flags1 = (r_ptr->flags1 & r_ptr->r_flags1);
- flags2 = (r_ptr->flags2 & r_ptr->r_flags2);
- flags3 = (r_ptr->flags3 & r_ptr->r_flags3);
- flags4 = (r_ptr->flags4 & r_ptr->r_flags4);
- flags5 = (r_ptr->flags5 & r_ptr->r_flags5);
- flags6 = (r_ptr->flags6 & r_ptr->r_flags6);
- flags7 = (r_ptr->flags7 & r_ptr->r_flags7);
- flags9 = (r_ptr->flags9 & r_ptr->r_flags9);
-
-
- /* Assume some "obvious" flags */
- if (r_ptr->flags1 & (RF1_UNIQUE)) flags1 |= (RF1_UNIQUE);
- if (r_ptr->flags1 & (RF1_MALE)) flags1 |= (RF1_MALE);
- if (r_ptr->flags1 & (RF1_FEMALE)) flags1 |= (RF1_FEMALE);
-
- /* Assume some "creation" flags */
- if (r_ptr->flags1 & (RF1_FRIEND)) flags1 |= (RF1_FRIEND);
- if (r_ptr->flags1 & (RF1_FRIENDS)) flags1 |= (RF1_FRIENDS);
- if (r_ptr->flags1 & (RF1_ESCORT)) flags1 |= (RF1_ESCORT);
- if (r_ptr->flags1 & (RF1_ESCORTS)) flags1 |= (RF1_ESCORTS);
-
- /* Killing a monster reveals some properties */
- if (r_ptr->r_tkills)
- {
- /* Know "race" flags */
- if (r_ptr->flags3 & (RF3_ORC)) flags3 |= (RF3_ORC);
- if (r_ptr->flags3 & (RF3_TROLL)) flags3 |= (RF3_TROLL);
- if (r_ptr->flags3 & (RF3_GIANT)) flags3 |= (RF3_GIANT);
- if (r_ptr->flags3 & (RF3_DRAGON)) flags3 |= (RF3_DRAGON);
- if (r_ptr->flags3 & (RF3_DEMON)) flags3 |= (RF3_DEMON);
- if (r_ptr->flags3 & (RF3_UNDEAD)) flags3 |= (RF3_UNDEAD);
- if (r_ptr->flags3 & (RF3_EVIL)) flags3 |= (RF3_EVIL);
- if (r_ptr->flags3 & (RF3_GOOD)) flags3 |= (RF3_GOOD);
- if (r_ptr->flags3 & (RF3_ANIMAL)) flags3 |= (RF3_ANIMAL);
- if (r_ptr->flags3 & (RF3_THUNDERLORD)) flags3 |= (RF3_THUNDERLORD);
- if (r_ptr->flags7 & (RF7_SPIDER)) flags7 |= (RF7_SPIDER);
-
- /* Know "forced" flags */
- if (r_ptr->flags1 & (RF1_FORCE_DEPTH)) flags1 |= (RF1_FORCE_DEPTH);
- if (r_ptr->flags1 & (RF1_FORCE_MAXHP)) flags1 |= (RF1_FORCE_MAXHP);
+ else if (flags1 & (RF1_MALE))
+ {
+ msex = 1;
}
-
/* Treat uniques differently */
if (flags1 & (RF1_UNIQUE))
{
- /* Hack -- Determine if the unique is "dead" */
- bool_ dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
-
- /* We've been killed... */
- if (r_ptr->r_deaths)
- {
- /* Killed ancestors */
- text_out(format("%^s has slain %d of your ancestors",
- wd_he[msex], r_ptr->r_deaths));
-
- /* But we've also killed it */
- if (dead)
- {
- text_out(format(", but you have avenged them! ") );
- }
-
- /* Unavenged (ever) */
- else
- {
- text_out(format(", who %s unavenged. ",
- plural(r_ptr->r_deaths, "remains", "remain")));
- }
- }
-
- /* Dead unique who never hurt us */
- else if (dead)
+ if (r_ptr->max_num == 0)
{
text_out("You have slain this foe. ");
}
}
- /* Not unique, but killed us */
- else if (r_ptr->r_deaths)
- {
- /* Dead ancestors */
- text_out(format("%d of your ancestors %s been killed by this creature, ",
- r_ptr->r_deaths, plural(r_ptr->r_deaths, "has", "have")));
-
- /* Some kills this life */
- if (r_ptr->r_pkills)
- {
- text_out("and you have exterminated at least ");
- text_out_c(TERM_L_GREEN, format("%d", r_ptr->r_pkills));
- text_out(" of the creatures. ");
- }
-
- /* Some kills past lives */
- else if (r_ptr->r_tkills)
- {
- text_out(format("and %s have exterminated at least %d of the creatures. ",
- "your ancestors", r_ptr->r_tkills));
- }
-
- /* No kills */
- else
- {
- text_out(format("and %s is not ever known to have been defeated. ",
- wd_he[msex]));
- }
- }
-
/* Normal monsters */
else
{
@@ -310,13 +102,6 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
text_out(" of these creatures. ");
}
- /* Killed some last life */
- else if (r_ptr->r_tkills)
- {
- text_out(format("Your ancestors have killed at least %d of these creatures. ",
- r_ptr->r_tkills));
- }
-
/* Killed none */
else
{
@@ -327,13 +112,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Descriptions */
{
- char buf[2048];
-
- /* Simple method */
- strcpy(buf, r_ptr->text);
-
- /* Dump it */
- text_out(buf);
+ text_out(r_ptr->text);
text_out(" ");
}
@@ -360,7 +139,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
text_out_c(TERM_L_GREEN, "lives in the town or the wilderness");
old = TRUE;
}
- else if (r_ptr->r_tkills)
+ else
{
if (old)
text_out(", ");
@@ -382,7 +161,6 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Describe movement */
- if (TRUE)
{
/* Introduction */
if (old)
@@ -466,7 +244,6 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Describe experience if known */
- if (r_ptr->r_tkills)
{
/* Introduction */
if (flags1 & (RF1_UNIQUE))
@@ -765,30 +542,14 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* End the sentence about inate/other spells */
if (breath || magic)
{
- /* Total casting */
- m = r_ptr->r_cast_inate + r_ptr->r_cast_spell;
-
/* Average frequency */
n = (r_ptr->freq_inate + r_ptr->freq_spell) / 2;
/* Describe the spell frequency */
- if (m > 100)
- {
- text_out("; ");
- text_out_c(TERM_L_GREEN, "1");
- text_out(" time in ");
- text_out_c(TERM_L_GREEN, format("%d", 100 / n));
- }
-
- /* Guess at the frequency */
- else if (m)
- {
- n = ((n + 9) / 10) * 10;
- text_out("; about ");
- text_out_c(TERM_L_GREEN, "1");
- text_out(" time in ");
- text_out_c(TERM_L_GREEN, format("%d", 100 / n));
- }
+ text_out("; ");
+ text_out_c(TERM_L_GREEN, "1");
+ text_out(" time in ");
+ text_out_c(TERM_L_GREEN, format("%d", 100 / n));
/* End this sentence */
text_out(". ");
@@ -796,7 +557,6 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Describe monster "toughness" */
- if (know_armour(r_ptr))
{
/* Armor */
text_out(format("%^s has an armor rating of ", wd_he[msex]));
@@ -1065,10 +825,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
}
- /* Do we know how aware it is? */
- if (((static_cast<int>(r_ptr->r_wake) * static_cast<int>(r_ptr->r_wake)) > r_ptr->sleep) ||
- (r_ptr->r_ignore == MAX_UCHAR) ||
- ((r_ptr->sleep == 0) && (r_ptr->r_tkills >= 10)))
+ /* How aware is it? */
{
cptr act;
@@ -1123,34 +880,46 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Drops gold and/or items */
- if (r_ptr->r_drop_gold || r_ptr->r_drop_item)
{
+ /* Calculate drops */
+ byte drop_gold;
+ byte drop_item;
+
+ drop_gold = drop_item =
+ (((r_ptr->flags1 & (RF1_DROP_4D2)) ? 8 : 0) +
+ ((r_ptr->flags1 & (RF1_DROP_3D2)) ? 6 : 0) +
+ ((r_ptr->flags1 & (RF1_DROP_2D2)) ? 4 : 0) +
+ ((r_ptr->flags1 & (RF1_DROP_1D2)) ? 2 : 0) +
+ ((r_ptr->flags1 & (RF1_DROP_90)) ? 1 : 0) +
+ ((r_ptr->flags1 & (RF1_DROP_60)) ? 1 : 0));
+
+ if (r_ptr->flags1 & RF1_ONLY_GOLD) drop_item = 0;
+ if (r_ptr->flags1 & RF1_ONLY_ITEM) drop_gold = 0;
+
/* No "n" needed */
sin = FALSE;
- /* Intro */
- text_out(format("%^s may carry", wd_he[msex]));
-
/* Count maximum drop */
- n = MAX(r_ptr->r_drop_gold, r_ptr->r_drop_item);
+ n = MAX(drop_gold, drop_item);
- /* One drop (may need an "n") */
- if (n == 1)
+ /* Intro text */
+ if (n == 0)
{
- text_out(" a");
+ text_out(format("%^s carries no items", wd_he[msex]));
+
+ }
+ else if (n == 1)
+ {
+ text_out(format("%^s may carry a", wd_he[msex]));
sin = TRUE;
}
-
- /* Two drops */
else if (n == 2)
{
- text_out(" one or two");
+ text_out(format("%^s may carry one or two", wd_he[msex]));
}
-
- /* Many drops */
else
{
- text_out(format(" up to %d", n));
+ text_out(format("%^s may carry up to %d", wd_he[msex], n));
}
@@ -1175,7 +944,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* Objects */
- if (r_ptr->r_drop_item)
+ if (drop_item)
{
/* Handle singular "an" */
if (sin) text_out("n");
@@ -1191,7 +960,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
}
/* Treasures */
- if (r_ptr->r_drop_gold)
+ if (drop_gold)
{
/* Cancel prefix */
if (!p) sin = FALSE;
@@ -1211,33 +980,27 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
}
- /* Count the number of "known" attacks */
+ /* Count the number of attacks */
for (n = 0, m = 0; m < 4; m++)
{
/* Skip non-attacks */
if (!r_ptr->blow[m].method) continue;
/* Count known attacks */
- if (r_ptr->r_blows[m]) n++;
+ n++;
}
- /* Examine (and count) the actual attacks */
+ /* Examine the actual attacks */
for (r = 0, m = 0; m < 4; m++)
{
- int method, effect, d1, d2;
-
/* Skip non-attacks */
if (!r_ptr->blow[m].method) continue;
- /* Skip unknown attacks */
- if (!r_ptr->r_blows[m]) continue;
-
-
/* Extract the attack info */
- method = r_ptr->blow[m].method;
- effect = r_ptr->blow[m].effect;
- d1 = r_ptr->blow[m].d_dice;
- d2 = r_ptr->blow[m].d_side;
+ int method = r_ptr->blow[m].method;
+ int effect = r_ptr->blow[m].effect;
+ int d1 = r_ptr->blow[m].d_dice;
+ int d2 = r_ptr->blow[m].d_side;
/* No method yet */
@@ -1457,7 +1220,7 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
text_out_c(TERM_YELLOW, q);
/* Describe damage (if known) */
- if (d1 && d2 && know_damage(r_ptr, m))
+ if (d1 && d2)
{
/* Display the damage */
text_out(" with damage");
@@ -1491,13 +1254,6 @@ static void roff_aux(std::shared_ptr<monster_race> r_ptr, int remem)
/* All done */
text_out("\n");
-
- /* Cheat -- know everything */
- if ((cheat_know) && (remem == 0))
- {
- /* Hack -- restore memory */
- *r_ptr = save_mem;
- }
}
/*
@@ -1566,7 +1322,7 @@ static void roff_top(int r_idx, int ego)
/*
* Hack -- describe the given monster race at the top of the screen
*/
-void screen_roff(int r_idx, int ego, int remember)
+void screen_roff(int r_idx, int ego)
{
auto r_ptr = race_info_idx(r_idx, ego);
@@ -1577,7 +1333,7 @@ void screen_roff(int r_idx, int ego, int remember)
Term_erase(0, 1, 255);
/* Recall monster */
- roff_aux(r_ptr, remember);
+ roff_aux(r_ptr);
/* Describe monster */
roff_top(r_idx, ego);
@@ -1590,7 +1346,7 @@ void monster_description_out(int r_idx, int ego)
{
auto r_ptr = race_info_idx(r_idx, ego);
roff_name(r_idx, ego);
- roff_aux(r_ptr, 0);
+ roff_aux(r_ptr);
}
/*
@@ -1614,7 +1370,7 @@ void display_roff(int r_idx, int ego)
/* Recall monster */
auto r_ptr = race_info_idx(r_idx, ego);
- roff_aux(r_ptr, 0);
+ roff_aux(r_ptr);
/* Describe monster */
roff_top(r_idx, ego);
diff --git a/src/monster1.hpp b/src/monster1.hpp
index 1d71fef1..9f7128ea 100644
--- a/src/monster1.hpp
+++ b/src/monster1.hpp
@@ -1,5 +1,5 @@
#pragma once
-extern void screen_roff(int r_idx, int ego, int remember);
+extern void screen_roff(int r_idx, int ego);
extern void display_roff(int r_idx, int ego);
extern void monster_description_out(int r_idx, int ego);
diff --git a/src/monster2.cc b/src/monster2.cc
index e166950f..2beb671f 100644
--- a/src/monster2.cc
+++ b/src/monster2.cc
@@ -1468,66 +1468,6 @@ void monster_race_desc(char *desc, int r_idx, int ego)
-/*
- * Learn about a monster (by "probing" it)
- */
-void lore_do_probe(int m_idx)
-{
- monster_type *m_ptr = &m_list[m_idx];
-
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
- /* Hack -- Memorize some flags */
- r_ptr->r_flags1 = r_ptr->flags1;
- r_ptr->r_flags2 = r_ptr->flags2;
- r_ptr->r_flags3 = r_ptr->flags3;
-
- /* Update monster recall window */
- if (monster_race_idx == m_ptr->r_idx)
- {
- /* Window stuff */
- p_ptr->window |= (PW_MONSTER);
- }
-}
-
-
-/*
- * Take note that the given monster just dropped some treasure
- *
- * Note that learning the "GOOD"/"GREAT" flags gives information
- * about the treasure (even when the monster is killed for the first
- * time, such as uniques, and the treasure has not been examined yet).
- *
- * This "indirect" method is used to prevent the player from learning
- * exactly how much treasure a monster can drop from observing only
- * a single example of a drop. This method actually observes how much
- * gold and items are dropped, and remembers that information to be
- * described later by the monster recall code.
- */
-void lore_treasure(int m_idx, int num_item, int num_gold)
-{
- monster_type *m_ptr = &m_list[m_idx];
-
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
- /* Note the number of things dropped */
- if (num_item > r_ptr->r_drop_item) r_ptr->r_drop_item = num_item;
- if (num_gold > r_ptr->r_drop_gold) r_ptr->r_drop_gold = num_gold;
-
- /* Hack -- memorize the good/great flags */
- if (r_ptr->flags1 & (RF1_DROP_GOOD)) r_ptr->r_flags1 |= (RF1_DROP_GOOD);
- if (r_ptr->flags1 & (RF1_DROP_GREAT)) r_ptr->r_flags1 |= (RF1_DROP_GREAT);
-
- /* Update monster recall window */
- if (monster_race_idx == m_ptr->r_idx)
- {
- /* Window stuff */
- p_ptr->window |= (PW_MONSTER);
- }
-}
-
-
-
static void sanity_blast(monster_type * m_ptr, bool_ necro)
{
bool_ happened = FALSE;
@@ -1592,9 +1532,6 @@ static void sanity_blast(monster_type * m_ptr, bool_ necro)
/* Something frightening happens... */
msg_format("You behold the %s visage of %s!",
horror_desc[(randint(MAX_HORROR)) - 1], m_name);
-
- r_ptr->r_flags2 |= RF2_ELDRITCH_HORROR;
-
}
/* Undead characters are 50% likely to be unaffected */
@@ -1742,15 +1679,6 @@ void update_mon(int m_idx, bool_ full)
/* Seen by vision */
bool_ easy = FALSE;
- /* Seen by telepathy */
- bool_ hard = FALSE;
-
- /* Various extra flags */
- bool_ do_empty_mind = FALSE;
- bool_ do_weird_mind = FALSE;
- bool_ do_invisible = FALSE;
- bool_ do_cold_blood = FALSE;
-
auto const r_ptr = m_ptr->race();
/* Calculate distance */
@@ -1789,20 +1717,21 @@ void update_mon(int m_idx, bool_ full)
{
/* Infravision only works on "warm" creatures */
/* Below, we will need to know that infravision failed */
- if (r_ptr->flags2 & (RF2_COLD_BLOOD)) do_cold_blood = TRUE;
-
- /* Infravision works */
- if (!do_cold_blood) easy = flag = TRUE;
+ if (!(r_ptr->flags2 & RF2_COLD_BLOOD))
+ {
+ /* Infravision works */
+ easy = flag = TRUE;
+ }
}
/* Use "illumination" */
if (player_can_see_bold(fy, fx))
{
- /* Take note of invisibility */
- if (r_ptr->flags2 & (RF2_INVISIBLE)) do_invisible = TRUE;
-
/* Visible, or detectable, monsters get seen */
- if (!do_invisible || p_ptr->see_inv) easy = flag = TRUE;
+ if (p_ptr->see_inv || !(r_ptr->flags2 & RF2_INVISIBLE))
+ {
+ easy = flag = TRUE;
+ }
}
}
@@ -1834,16 +1763,14 @@ void update_mon(int m_idx, bool_ full)
/* Empty mind, no telepathy */
if (r_ptr->flags2 & (RF2_EMPTY_MIND))
{
- do_empty_mind = TRUE;
+ /* No telepathy */
}
/* Weird mind, occasional telepathy */
else if (r_ptr->flags2 & (RF2_WEIRD_MIND))
{
- do_weird_mind = TRUE;
if (rand_int(100) < 10)
{
- hard = TRUE;
flag = TRUE;
}
}
@@ -1851,7 +1778,6 @@ void update_mon(int m_idx, bool_ full)
/* Normal mind, allow telepathy */
else
{
- hard = TRUE;
flag = TRUE;
}
}
@@ -1883,29 +1809,12 @@ void update_mon(int m_idx, bool_ full)
/* Update monster list window */
p_ptr->window |= (PW_M_LIST);
- /* Hack -- Count "fresh" sightings */
- if (r_ptr->r_sights < MAX_SHORT) r_ptr->r_sights++;
-
/* Disturb on appearance */
if (disturb_move)
{
if (disturb_pets || (is_friend(m_ptr) <= 0)) disturb(1);
}
}
-
- /* Apply telepathy */
- if (hard)
- {
- /* Hack -- Memorize mental flags */
- if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
- }
-
- /* Memorize various observable flags */
- if (do_empty_mind) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- if (do_weird_mind) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
- if (do_cold_blood) r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
- if (do_invisible) r_ptr->r_flags2 |= (RF2_INVISIBLE);
}
/* The monster is not visible */
diff --git a/src/monster2.hpp b/src/monster2.hpp
index 84f79e36..5ef5eaf9 100644
--- a/src/monster2.hpp
+++ b/src/monster2.hpp
@@ -23,8 +23,6 @@ extern errr get_mon_num_prep(void);
extern s16b get_mon_num(int level);
extern void monster_desc(char *desc, monster_type *m_ptr, int mode);
extern void monster_race_desc(char *desc, int r_idx, int ego);
-extern void lore_do_probe(int m_idx);
-extern void lore_treasure(int m_idx, int num_item, int num_gold);
extern void update_mon(int m_idx, bool_ full);
extern void update_monsters(bool_ full);
extern void monster_carry(monster_type *m_ptr, int m_idx, object_type *q_ptr);
diff --git a/src/monster3.cc b/src/monster3.cc
index 75227699..d01545ec 100644
--- a/src/monster3.cc
+++ b/src/monster3.cc
@@ -107,7 +107,6 @@ bool_ change_side(monster_type *m_ptr)
bool_ ai_multiply(int m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
int k, y, x, oy = m_ptr->fy, ox = m_ptr->fx;
bool_ is_frien = (is_friend(m_ptr) > 0);
@@ -135,12 +134,6 @@ bool_ ai_multiply(int m_idx)
/* Try to multiply */
if (multiply_monster(m_idx, (is_frien), FALSE))
{
- /* Take note if visible */
- if (m_ptr->ml)
- {
- r_ptr->r_flags4 |= (RF4_MULTIPLY);
- }
-
/* Multiplying takes energy */
return TRUE;
}
diff --git a/src/monster_race.hpp b/src/monster_race.hpp
index f756d6ff..ad44aef0 100644
--- a/src/monster_race.hpp
+++ b/src/monster_race.hpp
@@ -79,35 +79,7 @@ struct monster_race
byte cur_num; /* Monster population on current level */
- s16b r_sights; /* Count sightings of this monster */
- s16b r_deaths; /* Count deaths from this monster */
-
s16b r_pkills; /* Count monsters killed in this life */
- s16b r_tkills; /* Count monsters killed in all lives */
-
- byte r_wake; /* Number of times woken up (?) */
- byte r_ignore; /* Number of times ignored (?) */
-
- byte r_xtra1; /* Something (unused) */
- byte r_xtra2; /* Something (unused) */
-
- byte r_drop_gold; /* Max number of gold dropped at once */
- byte r_drop_item; /* Max number of item dropped at once */
-
- byte r_cast_inate; /* Max number of inate spells seen */
- byte r_cast_spell; /* Max number of other spells seen */
-
- byte r_blows[4]; /* Number of times each blow type was seen */
-
- u32b r_flags1; /* Observed racial flags */
- u32b r_flags2; /* Observed racial flags */
- u32b r_flags3; /* Observed racial flags */
- u32b r_flags4; /* Observed racial flags */
- u32b r_flags5; /* Observed racial flags */
- u32b r_flags6; /* Observed racial flags */
- u32b r_flags7; /* Observed racial flags */
- u32b r_flags8; /* Observed racial flags */
- u32b r_flags9; /* Observed racial flags */
bool_ on_saved; /* Is the (unique) on a saved level ? */
diff --git a/src/object2.cc b/src/object2.cc
index 18d0e980..54ed2636 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -4618,7 +4618,6 @@ static bool_ kind_is_good(int k_idx)
/* Expensive rod tips are good */
case TV_ROD:
{
- /* Probing is not good, but Recall is*/
if (k_ptr->cost >= 4500) return TRUE;
return FALSE;
}
diff --git a/src/spells1.cc b/src/spells1.cc
index 7a203bb8..3859ed65 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -4491,23 +4491,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
break;
}
- case GF_IDENTIFY:
- {
- if (seen) obvious = TRUE;
-
- /* Probe */
- do_probe(c_ptr->m_idx);
-
- dam = 0;
- break;
- }
-
/* Death -- instant death */
case GF_DEATH:
{
if (seen) obvious = TRUE;
- if (r_ptr->r_flags1 & RF1_UNIQUE)
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = " resists.";
dam = 0;
@@ -4534,13 +4523,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
note = " is hit hard.";
dam *= 3;
- if (seen) r_ptr->r_flags9 |= (RF9_SUSCEP_ACID);
}
if (r_ptr->flags3 & (RF3_IM_ACID))
{
note = " resists a lot.";
dam /= 9;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_ACID);
}
break;
}
@@ -4553,13 +4540,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
note = " is hit hard.";
dam *= 3;
- if (seen) r_ptr->r_flags9 |= (RF9_SUSCEP_ELEC);
}
if (r_ptr->flags3 & (RF3_IM_ELEC))
{
note = " resists a lot.";
dam /= 9;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_ELEC);
}
break;
}
@@ -4572,13 +4557,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
note = " is hit hard.";
dam *= 3;
- if (seen) r_ptr->r_flags3 |= (RF3_SUSCEP_FIRE);
}
if (r_ptr->flags3 & (RF3_IM_FIRE))
{
note = " resists a lot.";
dam /= 9;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_FIRE);
}
break;
}
@@ -4591,13 +4574,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
note = " is hit hard.";
dam *= 3;
- if (seen) r_ptr->r_flags3 |= (RF3_SUSCEP_COLD);
}
if (r_ptr->flags3 & (RF3_IM_COLD))
{
note = " resists a lot.";
dam /= 9;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_COLD);
}
break;
}
@@ -4612,14 +4593,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " is hit hard.";
dam *= 3;
do_pois *= 2;
- if (seen) r_ptr->r_flags9 |= (RF9_SUSCEP_POIS);
}
if (r_ptr->flags3 & (RF3_IM_POIS))
{
note = " resists a lot.";
dam /= 9;
do_pois = 0;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_POIS);
}
break;
}
@@ -4649,7 +4628,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen) r_ptr->r_flags3 |= (RF3_IM_POIS);
}
else if (randint(3) == 1) do_poly = TRUE;
break;
@@ -4663,7 +4641,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
dam *= 2;
note = " is hit hard.";
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
}
break;
}
@@ -4676,13 +4653,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
dam = 0;
note = " is immune.";
- if (seen) r_ptr->r_flags3 |= (RF3_GOOD);
}
else if (r_ptr->flags3 & (RF3_EVIL))
{
dam *= 2;
note = " is hit hard.";
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
}
else
{
@@ -4709,8 +4684,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen)
- r_ptr->r_flags3 |= (RF3_RES_PLAS);
}
break;
}
@@ -4723,21 +4696,17 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
note = " is immune.";
dam = 0;
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
}
else if (r_ptr->flags3 & (RF3_RES_NETH))
{
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
-
- if (seen) r_ptr->r_flags3 |= (RF3_RES_NETH);
}
else if (r_ptr->flags3 & (RF3_EVIL))
{
dam /= 2;
note = " resists somewhat.";
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
}
break;
}
@@ -4758,7 +4727,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen) r_ptr->r_flags3 |= (RF3_RES_WATE);
}
break;
}
@@ -4779,7 +4747,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen) r_ptr->r_flags3 |= (RF3_RES_WATE);
}
if (who == 0)
@@ -4953,7 +4920,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen) r_ptr->r_flags3 |= (RF3_RES_DISE);
}
break;
}
@@ -4967,7 +4933,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
- if (seen) r_ptr->r_flags3 |= (RF3_RES_NEXU);
}
break;
}
@@ -5120,13 +5085,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " is unaffected!";
resist_tele = TRUE;
}
else if (m_ptr->level > randint(100))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " resists!";
resist_tele = TRUE;
}
@@ -5189,7 +5152,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
if (r_ptr->flags3 & (RF3_HURT_ROCK))
{
- if (seen) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
note = " loses some skin!";
note_dies = " evaporates!";
dam *= 2;
@@ -5401,12 +5363,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(r_ptr->flags3 & (RF3_NO_CONF)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
do_conf = 0;
@@ -5498,14 +5454,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " is hit hard.";
dam *= 3;
do_cut *= 2;
- if (seen) r_ptr->r_flags3 |= (RF3_SUSCEP_COLD);
}
if (r_ptr->flags3 & (RF3_IM_COLD))
{
note = " resists a lot.";
dam /= 9;
do_cut = 0;
- if (seen) r_ptr->r_flags3 |= (RF3_IM_COLD);
}
break;
}
@@ -5521,15 +5475,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(r_ptr->flags3 & (RF3_NONLIVING)) ||
(strchr("Egv", r_ptr->d_char)))
{
- if (r_ptr->flags3 & (RF3_UNDEAD))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
- }
- if (r_ptr->flags3 & (RF3_DEMON))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_DEMON);
- }
-
note = " is unaffected!";
obvious = FALSE;
dam = 0;
@@ -5545,11 +5490,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if ((r_ptr->flags3 & (RF3_UNDEAD)) ||
(r_ptr->flags3 & (RF3_NONLIVING)))
{
- if (r_ptr->flags3 & (RF3_UNDEAD))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
- }
-
note = " is immune.";
obvious = FALSE;
dam = 0;
@@ -5698,12 +5638,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if ((r_ptr->flags3 & (RF3_NO_SLEEP)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_SLEEP))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_SLEEP);
- }
-
/* No obvious effect */
note = " is unaffected!";
obvious = FALSE;
@@ -5757,12 +5691,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 5))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
/* No obvious effect */
note = " is unaffected!";
@@ -5800,12 +5728,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 5))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
/* No obvious effect */
note = " is unaffected!";
@@ -5907,12 +5829,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(r_ptr->flags3 & (RF3_NO_CONF)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
/* No obvious effect */
note = " is unaffected!";
@@ -5945,12 +5861,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
(!(r_ptr->flags3 & (RF3_DEMON))) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
/* No obvious effect */
note = " is unaffected!";
@@ -5983,12 +5893,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
do_conf = 0;
@@ -6036,12 +5940,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
do_conf = 0;
@@ -6116,12 +6014,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (seen) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
/* Resist */
do_conf = 0;
@@ -6155,9 +6047,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Obvious effect */
if (seen) obvious = TRUE;
- /* Memorize the effects */
- if (seen) r_ptr->r_flags3 |= (RF3_HURT_LITE);
-
/* Special effect */
note = " cringes from the light!";
note_dies = " shrivels away in the light!";
@@ -6187,7 +6076,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
}
else if (r_ptr->flags3 & (RF3_HURT_LITE))
{
- if (seen) r_ptr->r_flags3 |= (RF3_HURT_LITE);
note = " cringes from the light!";
note_dies = " shrivels away in the light!";
dam *= 2;
@@ -6223,9 +6111,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Notice effect */
if (seen) obvious = TRUE;
- /* Memorize the effects */
- if (seen) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
-
/* Cute little message */
note = " loses some skin!";
note_dies = " dissolves!";
@@ -6256,13 +6141,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " is unaffected!";
resists_tele = TRUE;
}
else if (m_ptr->level > randint(100))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " resists!";
resists_tele = TRUE;
}
@@ -6271,7 +6154,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (!resists_tele)
{
if (seen) obvious = TRUE;
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
do_dist = dam;
}
}
@@ -6302,13 +6184,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " is unaffected!";
resists_tele = TRUE;
}
else if (m_ptr->level > randint(100))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " resists!";
resists_tele = TRUE;
}
@@ -6317,7 +6197,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (!resists_tele)
{
if (seen) obvious = TRUE;
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
do_dist = dam;
}
}
@@ -6345,13 +6224,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (r_ptr->flags1 & (RF1_UNIQUE))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " is unaffected!";
resists_tele = TRUE;
}
else if (m_ptr->level > randint(100))
{
- if (seen) r_ptr->r_flags3 |= RF3_RES_TELE;
note = " resists!";
resists_tele = TRUE;
}
@@ -6378,9 +6255,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect undead */
if (r_ptr->flags3 & (RF3_UNDEAD))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -6416,9 +6290,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect evil */
if (r_ptr->flags3 & (RF3_EVIL))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -6480,9 +6351,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect undead */
if (r_ptr->flags3 & (RF3_UNDEAD))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_UNDEAD);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -6511,9 +6379,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect evil */
if (r_ptr->flags3 & (RF3_EVIL))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_EVIL);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -6541,9 +6406,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect good */
if (r_ptr->flags3 & (RF3_GOOD))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_GOOD);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -6599,9 +6461,6 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Only affect demons */
if (r_ptr->flags3 & (RF3_DEMON))
{
- /* Learn about type */
- if (seen) r_ptr->r_flags3 |= (RF3_DEMON);
-
/* Obvious */
if (seen) obvious = TRUE;
@@ -8654,7 +8513,6 @@ bool_ project(int who, int rad, int y, int x, int dam, int typ, int flg)
if (m_list[cave[y][x].m_idx].ml)
{
msg_print("The attack bounces!");
- ref_ptr->r_flags2 |= RF2_REFLECTING;
}
project(cave[y][x].m_idx, 0, t_y, t_x, dam, typ, flg);
diff --git a/src/spells2.cc b/src/spells2.cc
index 3882a914..5dfaa074 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -2294,7 +2294,7 @@ bool_ detect_treasure(int rad)
* The "update function" is called exactly once if
* the predicate succeeds. The
*/
-template<typename P, typename U> static bool detect_monsters_fn(int radius, P p, U u) {
+template<typename P> static bool detect_monsters_fn(int radius, P p) {
bool flag = false;
/* Scan monsters */
for (int i = 1; i < m_max; i++)
@@ -2320,19 +2320,6 @@ template<typename P, typename U> static bool detect_monsters_fn(int radius, P p,
auto r_ptr = m_ptr->race();
if (p(r_ptr.get()))
{
- /* Update */
- u(r_ptr.get());
-
- /* We're assuming the update function does
- * *something*, so we'll need to update
- * the recall window if we're currently looking
- * at it.
- */
- if (monster_race_idx == m_ptr->r_idx)
- {
- p_ptr->window |= (PW_MONSTER);
- }
-
/* Repair visibility later */
repair_monsters = TRUE;
@@ -2361,11 +2348,9 @@ static bool_ detect_monsters_string(cptr chars, int rad)
auto predicate = [chars](monster_race *r_ptr) -> bool {
return strchr(chars, r_ptr->d_char);
};
- auto update = [](monster_race *) -> void {
- };
/* Describe */
- if (detect_monsters_fn(rad, predicate, update))
+ if (detect_monsters_fn(rad, predicate))
{
/* Describe result */
msg_print("You sense the presence of monsters!");
@@ -2502,10 +2487,8 @@ bool_ detect_monsters_normal(int rad)
return (!(r_ptr->flags2 & (RF2_INVISIBLE))) ||
p_ptr->see_inv || p_ptr->tim_invis;
};
- auto update = [](monster_race *) -> void {
- };
- if (detect_monsters_fn(rad, predicate, update))
+ if (detect_monsters_fn(rad, predicate))
{
/* Describe result */
msg_print("You sense the presence of monsters!");
@@ -2526,11 +2509,8 @@ bool_ detect_monsters_invis(int rad)
auto predicate = [](monster_race *r_ptr) -> bool {
return (r_ptr->flags2 & (RF2_INVISIBLE));
};
- auto update = [](monster_race *r_ptr) -> void {
- r_ptr->r_flags2 |= (RF2_INVISIBLE);
- };
- if (detect_monsters_fn(rad, predicate, update))
+ if (detect_monsters_fn(rad, predicate))
{
/* Describe result */
msg_print("You sense the presence of invisible creatures!");
@@ -2552,11 +2532,8 @@ bool_ detect_monsters_xxx(u32b match_flag, int rad)
auto predicate = [match_flag](monster_race *r_ptr) -> bool {
return (r_ptr->flags3 & match_flag);
};
- auto update = [match_flag](monster_race *r_ptr) -> void {
- r_ptr->r_flags3 |= (match_flag);
- };
- if (detect_monsters_fn(rad, predicate, update))
+ if (detect_monsters_fn(rad, predicate))
{
cptr desc_monsters = "weird monsters";
switch (match_flag)
@@ -4219,94 +4196,6 @@ bool_ mass_genocide(bool_ player_cast)
return (result);
}
-/* Probe a monster */
-void do_probe(int m_idx)
-{
- char m_name[80];
- monster_type *m_ptr = &m_list[m_idx];
-
- /* Get "the monster" or "something" */
- monster_desc(m_name, m_ptr, 0x04);
-
- /* Describe the monster */
- if (!wizard && (m_ptr->status != MSTATUS_COMPANION)) msg_format("%^s has %d hit points.", m_name, m_ptr->hp);
- else
- {
- int i;
- char t_name[80];
- msg_format("%^s has %d(%d) hit points, %d ac, %d speed.", m_name, m_ptr->hp, m_ptr->maxhp, m_ptr->ac, m_ptr->mspeed - 110);
- msg_format("%^s attacks with:", m_name);
-
- for (i = 0; i < 4; i++)
- {
- msg_format(" Blow %d: %dd%d", i, m_ptr->blow[i].d_dice, m_ptr->blow[i].d_side);
- }
-
- if (m_ptr->target > 0)
- monster_desc(t_name, &m_list[m_ptr->target], 0x04);
- else if (!m_ptr->target)
- sprintf(t_name, "you");
- else
- sprintf(t_name, "nothing");
- msg_format("%^s target is %s.", m_name, t_name);
-
- {
- std::ostringstream buf;
- buf << " has " << m_ptr->exp
- << " exp and needs " << monster_exp(m_ptr->level + 1) << ".";
- msg_format("%^s%s", m_name, buf.str().c_str());
- }
- }
-
- /* Learn all of the non-spell, non-treasure flags */
- lore_do_probe(m_idx);
-}
-
-/*
- * Probe nearby monsters
- */
-bool_ probing(void)
-{
- int i;
-
- bool_ probe = FALSE;
-
-
- /* Probe all (nearby) monsters */
- for (i = 1; i < m_max; i++)
- {
- monster_type *m_ptr = &m_list[i];
-
- /* Paranoia -- Skip dead monsters */
- if (!m_ptr->r_idx) continue;
-
- /* Require line of sight */
- if (!player_has_los_bold(m_ptr->fy, m_ptr->fx)) continue;
-
- /* Probe visible monsters */
- if (m_ptr->ml)
- {
- /* Start the message */
- if (!probe) msg_print("Probing...");
-
- /* Actualy probe */
- do_probe(i);
-
- /* Probe worked */
- probe = TRUE;
- }
- }
-
- /* Done */
- if (probe)
- {
- msg_print("That's all.");
- }
-
- /* Result */
- return (probe);
-}
-
/*
* The spell of destruction
diff --git a/src/spells2.hpp b/src/spells2.hpp
index bffc4a2c..ce72a883 100644
--- a/src/spells2.hpp
+++ b/src/spells2.hpp
@@ -46,8 +46,6 @@ extern void aggravate_monsters(int who);
extern bool_ genocide_aux(bool_ player_cast, char typ);
extern bool_ genocide(bool_ player_cast);
extern bool_ mass_genocide(bool_ player_cast);
-extern void do_probe(int m_idx);
-extern bool_ probing(void);
extern void change_wild_mode(void);
extern bool_ banish_evil(int dist);
extern bool_ dispel_evil(int dam);
diff --git a/src/spells5.cc b/src/spells5.cc
index f503c822..dc237382 100644
--- a/src/spells5.cc
+++ b/src/spells5.cc
@@ -1143,7 +1143,7 @@ void school_spells_init()
spell_type_describe(spell, "Asks for an object and identifies it");
spell_type_describe(spell, "At level 17 it identifies all objects in the inventory");
spell_type_describe(spell, "At level 27 it identifies all objects in the inventory and in a");
- spell_type_describe(spell, "radius on the floor, as well as probing monsters in that radius");
+ spell_type_describe(spell, "radius on the floor");
spell_type_set_mana(spell, 10, 50);
spell_type_set_difficulty(spell, 8, 40);
spell_type_init_mage(spell,
@@ -2321,8 +2321,7 @@ void school_spells_init()
{
spell_type *spell = spell_new(&MUSIC_MIND, "Clairaudience(IV)");
spell_type_describe(spell, "Allows you to sense monster minds as long as you sing.");
- spell_type_describe(spell, "At level 10 it identifies all objects in a radius on the floor,");
- spell_type_describe(spell, "as well as probing monsters in that radius.");
+ spell_type_describe(spell, "At level 10 it identifies all objects in a radius on the floor.");
spell_type_describe(spell, "Consumes the amount of mana each turn.");
spell_type_set_mana(spell, 15, 30);
spell_type_set_difficulty(spell, 25, 75);
diff --git a/src/variable.cc b/src/variable.cc
index 6fa38470..524766ea 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -175,7 +175,6 @@ bool_ cheat_peek; /* Peek into object creation */
bool_ cheat_hear; /* Peek into monster creation */
bool_ cheat_room; /* Peek into dungeon creation */
bool_ cheat_xtra; /* Peek into something else */
-bool_ cheat_know; /* Know complete monster info */
bool_ cheat_live; /* Allow player to avoid death */
diff --git a/src/variable.hpp b/src/variable.hpp
index 9c4340a0..543c1bd5 100644
--- a/src/variable.hpp
+++ b/src/variable.hpp
@@ -121,7 +121,6 @@ extern bool_ cheat_peek;
extern bool_ cheat_hear;
extern bool_ cheat_room;
extern bool_ cheat_xtra;
-extern bool_ cheat_know;
extern bool_ cheat_live;
extern byte hitpoint_warn;
extern byte delay_factor;
diff --git a/src/xtra1.cc b/src/xtra1.cc
index 140d9edc..8815e756 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -1446,8 +1446,8 @@ static void fix_m_list(void)
attr = TERM_L_BLUE;
}
- /* Have we ever killed one? */
- if (r_ptr->r_tkills)
+ /* Have we killed one? */
+ if (r_ptr->r_pkills)
{
if (r_ptr->level > dun_level)
{
diff --git a/src/xtra2.cc b/src/xtra2.cc
index d3e01b71..52e0fc7b 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -2470,15 +2470,10 @@ static void monster_death_gods(int m_idx, monster_type *m_ptr)
*/
void monster_death(int m_idx)
{
- int dump_item = 0;
- int dump_gold = 0;
-
monster_type *m_ptr = &m_list[m_idx];
auto const r_ptr = m_ptr->race();
- bool_ visible = (m_ptr->ml || (r_ptr->flags1 & (RF1_UNIQUE)));
-
bool_ create_stairs = FALSE;
int force_coin = get_coin_type(r_ptr);
@@ -2548,9 +2543,6 @@ void monster_death(int m_idx)
/* Delete the object */
delete_object_idx(this_o_idx);
- if (q_ptr->tval == TV_GOLD) dump_gold++;
- else dump_item++;
-
/* Drop it */
drop_near(q_ptr, -1, y, x);
}
@@ -2964,13 +2956,6 @@ void monster_death(int m_idx)
if ((!force_coin) && (magik(10 + get_skill_scale(SKILL_PRESERVATION, 75))) && (!(m_ptr->mflag & MFLAG_NO_DROP)))
place_corpse(m_ptr);
- /* Take note of any dropped treasure */
- if (visible && (dump_item || dump_gold))
- {
- /* Take notes on treasure */
- lore_treasure(m_idx, dump_item, dump_gold);
- }
-
/* Create a magical staircase */
if (create_stairs && (dun_level < d_info[dungeon_type].maxdepth))
{
@@ -3296,9 +3281,6 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
/* Count kills this life */
if (r_ptr->r_pkills < MAX_SHORT) r_ptr->r_pkills++;
- /* Count kills in all lives */
- if (r_ptr->r_tkills < MAX_SHORT) r_ptr->r_tkills++;
-
/* Hack -- Auto-recall */
monster_race_track(m_ptr->r_idx, m_ptr->ego);
}
@@ -4080,7 +4062,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
Term_save();
/* Recall on screen */
- screen_roff(m_ptr->r_idx, m_ptr->ego, 0);
+ screen_roff(m_ptr->r_idx, m_ptr->ego);
/* Hack -- Complete the prompt (again) */
Term_addstr( -1, TERM_WHITE, format(" [r,%s]", info));
@@ -4429,8 +4411,6 @@ bool_ target_set(int mode)
char info[80];
- cave_type *c_ptr;
-
int screen_wid, screen_hgt;
int panel_wid, panel_hgt;
@@ -4465,7 +4445,7 @@ bool_ target_set(int mode)
x = points[m].x();
/* Access */
- c_ptr = &cave[y][x];
+ cave_type *c_ptr = &cave[y][x];
/* Allow target */
if (target_able(c_ptr->m_idx))
@@ -4631,9 +4611,6 @@ bool_ target_set(int mode)
/* Arbitrary grids */
else
{
- /* Access */
- c_ptr = &cave[y][x];
-
/* Default prompt */
strcpy(info, "q,t,p,m,+,-,'dir'");