summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-08 04:56:38 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-08 04:56:38 +0000
commitd5f262eb187ed2a96b0216103210c8ba8057d59c (patch)
tree09a1c4a988f7f515d2c35a1092ba427784b20cc6
parenteff7b910f0081718d468b2158cbc18f4ede83ddb (diff)
downloadcrawl-ref-d5f262eb187ed2a96b0216103210c8ba8057d59c.tar.gz
crawl-ref-d5f262eb187ed2a96b0216103210c8ba8057d59c.zip
Since fixed artefacts are going to be folded into unrandarts, and unrandarts
have already become almost identical to randarts, change "randart" to "artefact" everywhere except for things that deal exclusively with randarts. Artefact related files will be renamed later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9921 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/crawl_manual.txt10
-rw-r--r--crawl-ref/docs/options_guide.txt6
-rw-r--r--crawl-ref/settings/init.txt2
-rw-r--r--crawl-ref/source/abl-show.cc12
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/debug.cc252
-rw-r--r--crawl-ref/source/debug.h2
-rw-r--r--crawl-ref/source/delay.cc6
-rw-r--r--crawl-ref/source/describe.cc176
-rw-r--r--crawl-ref/source/describe.h2
-rw-r--r--crawl-ref/source/effects.cc18
-rw-r--r--crawl-ref/source/enum.h68
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/fight.cc12
-rw-r--r--crawl-ref/source/fight.h2
-rw-r--r--crawl-ref/source/food.cc2
-rw-r--r--crawl-ref/source/initfile.cc4
-rw-r--r--crawl-ref/source/it_use2.cc38
-rw-r--r--crawl-ref/source/it_use2.h2
-rw-r--r--crawl-ref/source/item_use.cc130
-rw-r--r--crawl-ref/source/item_use.h4
-rw-r--r--crawl-ref/source/itemprop.cc18
-rw-r--r--crawl-ref/source/mon-util.cc30
-rw-r--r--crawl-ref/source/output.cc2
-rw-r--r--crawl-ref/source/player.cc58
-rw-r--r--crawl-ref/source/player.h4
-rw-r--r--crawl-ref/source/randart.cc505
-rw-r--r--crawl-ref/source/randart.h57
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/shopping.cc84
-rw-r--r--crawl-ref/source/shopping.h2
-rw-r--r--crawl-ref/source/spells1.cc8
-rw-r--r--crawl-ref/source/spells3.cc4
-rw-r--r--crawl-ref/source/spl-book.cc4
-rw-r--r--crawl-ref/source/transfor.cc6
-rw-r--r--crawl-ref/source/xom.cc10
36 files changed, 778 insertions, 770 deletions
diff --git a/crawl-ref/docs/crawl_manual.txt b/crawl-ref/docs/crawl_manual.txt
index 4907c86cce..eb1446e62e 100644
--- a/crawl-ref/docs/crawl_manual.txt
+++ b/crawl-ref/docs/crawl_manual.txt
@@ -2761,12 +2761,12 @@ inscribed. See options_guide.txt for details. Some examples are
autoinscribe = royal jell:=g
autoinscribe = wand of healing:!v
-Randart autoinscriptions
+Artefacts autoinscriptions
------------------------
-Many players use inscriptions for properties of random artefacts. This
-makes browsing the inventory or stashes easier. Crawl provides a scheme
-for automatic inscription (you can switch this off using the option
-autoinscribe_randarts=false).
+Many players use inscriptions for properties of artefacts. This makes
+browsing the inventory or stashes easier. Crawl provides a scheme for
+automatic inscription (you can switch this off using the option
+autoinscribe_artefacts=false).
Here, one has to negotiate between two concurrent objectives: terseness
for better use of limited line lengths versus verboseness for easier
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index eb80df825d..f2f381dcb5 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -80,7 +80,7 @@ The contents of this text are:
monster_damage, rotten_meat, equipment, floor, multiturn,
examine, examine_filter, diagnostics, error, tutorial
4-m Inscriptions.
- autoinscribe, autoinscribe_randarts
+ autoinscribe, autoinscribe_artefacts
4-n Macro related Options.
flush.failure, flush.command, flush.message,
macro_meta_entry, additional_macro_file, bindkey
@@ -1526,8 +1526,8 @@ autoinscribe = <regex>:<inscription>
lose charges of important wands accidentally, as in
autoinscribe = wand of healing:!z
-autoinscribe_randarts = true
- Automatically inscribes identified randarts with their properties.
+autoinscribe_artefacts = true
+ Automatically inscribes identified artefacts with their properties.
4-n Macro related Options.
------------------------------
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index e130ff0925..6be1049e00 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -329,7 +329,7 @@ menu_colour = notes:white:Reached XP level
autoinscribe = distortion:!w
# autoinscribe = potion.*mutation:!q
# autoinscribe = royal jell:=g
-# autoinscribe_randarts = false
+# autoinscribe_artefacts = false
##### 4-n Macro related Options #################
#
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 207523fd19..30d4e972b5 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -2227,18 +2227,18 @@ std::vector<talent> your_talents(bool check_confused)
_add_talent(talents, ABIL_DELAYED_FIREBALL, check_confused);
// Evocations from items.
- if (scan_randarts(RAP_BLINK))
+ if (scan_artefacts(ARTP_BLINK))
_add_talent(talents, ABIL_EVOKE_BLINK, check_confused);
- if (wearing_amulet(AMU_RAGE) || scan_randarts(RAP_BERSERK))
+ if (wearing_amulet(AMU_RAGE) || scan_artefacts(ARTP_BERSERK))
_add_talent(talents, ABIL_EVOKE_BERSERK, check_confused);
- if (scan_randarts( RAP_MAPPING ))
+ if (scan_artefacts( ARTP_MAPPING ))
_add_talent(talents, ABIL_EVOKE_MAPPING, check_confused);
if (player_equip( EQ_RINGS, RING_INVISIBILITY )
|| player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_DARKNESS )
- || scan_randarts( RAP_INVISIBLE ))
+ || scan_artefacts( ARTP_INVISIBLE ))
{
// Now you can only turn invisibility off if you have an
// activatable item. Wands and potions will have to time
@@ -2252,7 +2252,7 @@ std::vector<talent> your_talents(bool check_confused)
// Note: This ability only applies to this counter.
if (player_equip( EQ_RINGS, RING_LEVITATION )
|| player_equip_ego_type( EQ_BOOTS, SPARM_LEVITATION )
- || scan_randarts( RAP_LEVITATE ))
+ || scan_artefacts( ARTP_LEVITATE ))
{
// Has no effect on permanently flying Kenku.
if (!you.permanent_flight())
@@ -2268,7 +2268,7 @@ std::vector<talent> your_talents(bool check_confused)
}
if (player_equip( EQ_RINGS, RING_TELEPORTATION )
- || scan_randarts( RAP_CAN_TELEPORT ))
+ || scan_artefacts( ARTP_CAN_TELEPORT ))
{
_add_talent(talents, ABIL_EVOKE_TELEPORTATION, check_confused);
}
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index f014e47b40..b0e05d51fd 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -457,7 +457,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail)
case 'S': wizard_set_skill_level(); break;
case 'A': wizard_set_all_skills(); break;
case 'a': acquirement(OBJ_RANDOM, AQ_WIZMODE); break;
- case 'v': wizard_value_randart(); break;
+ case 'v': wizard_value_artefact(); break;
case '+': wizard_make_object_randart(); break;
case '|': wizard_create_all_artefacts(); break;
case 'C': wizard_uncurse_item(); break;
@@ -1666,7 +1666,7 @@ void process_command( command_type cmd )
}
// Randart weapons.
- if (scan_randarts(RAP_PREVENT_SPELLCASTING))
+ if (scan_artefacts(ARTP_PREVENT_SPELLCASTING))
{
mpr("Something interferes with your magic!");
flush_input_buffer( FLUSH_ON_FAILURE );
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 6158cdf588..0712d901eb 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1680,7 +1680,7 @@ bool get_item_by_name(item_def *item, char* specs,
}
#ifdef WIZARD
-const char* _prop_name[RAP_NUM_PROPERTIES] = {
+const char* _prop_name[ARTP_NUM_PROPERTIES] = {
"Brand",
"AC",
"EV",
@@ -1714,42 +1714,42 @@ const char* _prop_name[RAP_NUM_PROPERTIES] = {
"MP"
};
-#define RAP_VAL_BOOL 0
-#define RAP_VAL_POS 1
-#define RAP_VAL_ANY 2
-
-char _prop_type[RAP_NUM_PROPERTIES] = {
- RAP_VAL_POS, //BRAND
- RAP_VAL_ANY, //AC
- RAP_VAL_ANY, //EVASION
- RAP_VAL_ANY, //STRENGTH
- RAP_VAL_ANY, //INTELLIGENCE
- RAP_VAL_ANY, //DEXTERITY
- RAP_VAL_ANY, //FIRE
- RAP_VAL_ANY, //COLD
- RAP_VAL_BOOL, //ELECTRICITY
- RAP_VAL_BOOL, //POISON
- RAP_VAL_BOOL, //NEGATIVE_ENERGY
- RAP_VAL_POS, //MAGIC
- RAP_VAL_BOOL, //EYESIGHT
- RAP_VAL_BOOL, //INVISIBLE
- RAP_VAL_BOOL, //LEVITATE
- RAP_VAL_BOOL, //BLINK
- RAP_VAL_BOOL, //CAN_TELEPORT
- RAP_VAL_BOOL, //BERSERK
- RAP_VAL_BOOL, //MAPPING
- RAP_VAL_POS, //NOISES
- RAP_VAL_BOOL, //PREVENT_SPELLCASTING
- RAP_VAL_BOOL, //CAUSE_TELEPORTATION
- RAP_VAL_BOOL, //PREVENT_TELEPORTATION
- RAP_VAL_POS, //ANGRY
- RAP_VAL_POS, //METABOLISM
- RAP_VAL_POS, //MUTAGENIC
- RAP_VAL_ANY, //ACCURACY
- RAP_VAL_ANY, //DAMAGE
- RAP_VAL_POS, //CURSED
- RAP_VAL_ANY, //STEALTH
- RAP_VAL_ANY //MAGICAL_POWER
+#define ARTP_VAL_BOOL 0
+#define ARTP_VAL_POS 1
+#define ARTP_VAL_ANY 2
+
+char _prop_type[ARTP_NUM_PROPERTIES] = {
+ ARTP_VAL_POS, //BRAND
+ ARTP_VAL_ANY, //AC
+ ARTP_VAL_ANY, //EVASION
+ ARTP_VAL_ANY, //STRENGTH
+ ARTP_VAL_ANY, //INTELLIGENCE
+ ARTP_VAL_ANY, //DEXTERITY
+ ARTP_VAL_ANY, //FIRE
+ ARTP_VAL_ANY, //COLD
+ ARTP_VAL_BOOL, //ELECTRICITY
+ ARTP_VAL_BOOL, //POISON
+ ARTP_VAL_BOOL, //NEGATIVE_ENERGY
+ ARTP_VAL_POS, //MAGIC
+ ARTP_VAL_BOOL, //EYESIGHT
+ ARTP_VAL_BOOL, //INVISIBLE
+ ARTP_VAL_BOOL, //LEVITATE
+ ARTP_VAL_BOOL, //BLINK
+ ARTP_VAL_BOOL, //CAN_TELEPORT
+ ARTP_VAL_BOOL, //BERSERK
+ ARTP_VAL_BOOL, //MAPPING
+ ARTP_VAL_POS, //NOISES
+ ARTP_VAL_BOOL, //PREVENT_SPELLCASTING
+ ARTP_VAL_BOOL, //CAUSE_TELEPORTATION
+ ARTP_VAL_BOOL, //PREVENT_TELEPORTATION
+ ARTP_VAL_POS, //ANGRY
+ ARTP_VAL_POS, //METABOLISM
+ ARTP_VAL_POS, //MUTAGENIC
+ ARTP_VAL_ANY, //ACCURACY
+ ARTP_VAL_ANY, //DAMAGE
+ ARTP_VAL_POS, //CURSED
+ ARTP_VAL_ANY, //STEALTH
+ ARTP_VAL_ANY //MAGICAL_POWER
};
static void _tweak_randart(item_def &item)
@@ -1761,12 +1761,12 @@ static void _tweak_randart(item_def &item)
return;
}
- randart_properties_t props;
- randart_wpn_properties(item, props);
+ artefact_properties_t props;
+ artefact_wpn_properties(item, props);
std::string prompt = "";
- for (int i = 0; i < RAP_NUM_PROPERTIES; ++i)
+ for (int i = 0; i < ARTP_NUM_PROPERTIES; ++i)
{
if (i % 8 == 0 && i != 0)
prompt += "\n";
@@ -1803,14 +1803,14 @@ static void _tweak_randart(item_def &item)
int val;
switch (_prop_type[choice])
{
- case RAP_VAL_BOOL:
+ case ARTP_VAL_BOOL:
mprf(MSGCH_PROMPT, "Toggling %s to %s.", _prop_name[choice],
props[choice] ? "off" : "on");
- randart_set_property(item, static_cast<randart_prop_type>(choice),
- !props[choice]);
+ artefact_set_property(item, static_cast<artefact_prop_type>(choice),
+ !props[choice]);
break;
- case RAP_VAL_POS:
+ case ARTP_VAL_POS:
mprf(MSGCH_PROMPT, "%s was %d.", _prop_name[choice], props[choice]);
val = _debug_prompt_for_int("New value? ", true);
@@ -1820,14 +1820,14 @@ static void _tweak_randart(item_def &item)
_prop_name[choice]);
return;
}
- randart_set_property(item, static_cast<randart_prop_type>(choice),
- val);
+ artefact_set_property(item, static_cast<artefact_prop_type>(choice),
+ val);
break;
- case RAP_VAL_ANY:
+ case ARTP_VAL_ANY:
mprf(MSGCH_PROMPT, "%s was %d.", _prop_name[choice], props[choice]);
val = _debug_prompt_for_int("New value? ", false);
- randart_set_property(item, static_cast<randart_prop_type>(choice),
- val);
+ artefact_set_property(item, static_cast<artefact_prop_type>(choice),
+ val);
break;
}
}
@@ -1961,7 +1961,7 @@ static bool _make_book_randart(item_def &book)
return make_book_theme_randart(book);
}
-void wizard_value_randart()
+void wizard_value_artefact()
{
int i = prompt_invent_item( "Value of which randart?", MT_INVLIST, -1 );
@@ -1970,7 +1970,7 @@ void wizard_value_randart()
if (!is_random_artefact( you.inv[i] ))
mpr("That item is not an artefact!");
else
- mprf("randart val: %d", randart_value(you.inv[i]));
+ mprf("randart val: %d", artefact_value(you.inv[i]));
}
}
@@ -2061,7 +2061,7 @@ void wizard_make_object_randart()
}
if (item_is_equipped(item))
- unuse_randart(item);
+ unuse_artefact(item);
item.special = 0;
item.flags &= ~ISFLAG_RANDART;
@@ -2097,15 +2097,15 @@ void wizard_make_object_randart()
return;
}
- if (Options.autoinscribe_randarts)
+ if (Options.autoinscribe_artefacts)
{
add_autoinscription(item,
- randart_auto_inscription(you.inv[i]));
+ artefact_auto_inscription(you.inv[i]));
}
// If equipped, apply new randart benefits.
if (item_is_equipped(item))
- use_randart(item);
+ use_artefact(item);
mpr(item.name(DESC_INVENTORY_EQUIP).c_str());
}
@@ -3490,44 +3490,44 @@ static void _debug_rap_stats(FILE *ostat)
// -1 = always bad, 1 = always good, 0 = depends on value
const int good_or_bad[] = {
- 1, //RAP_BRAND
- 0, //RAP_AC
- 0, //RAP_EVASION
- 0, //RAP_STRENGTH
- 0, //RAP_INTELLIGENCE
- 0, //RAP_DEXTERITY
- 0, //RAP_FIRE
- 0, //RAP_COLD
- 1, //RAP_ELECTRICITY
- 1, //RAP_POISON
- 1, //RAP_NEGATIVE_ENERGY
- 1, //RAP_MAGIC
- 1, //RAP_EYESIGHT
- 1, //RAP_INVISIBLE
- 1, //RAP_LEVITATE
- 1, //RAP_BLINK
- 1, //RAP_CAN_TELEPORT
- 1, //RAP_BERSERK
- 1, //RAP_MAPPING
- -1, //RAP_NOISES
- -1, //RAP_PREVENT_SPELLCASTING
- -1, //RAP_CAUSE_TELEPORTATION
- -1, //RAP_PREVENT_TELEPORTATION
- -1, //RAP_ANGRY
- -1, //RAP_METABOLISM
- -1, //RAP_MUTAGENIC
- 0, //RAP_ACCURACY
- 0, //RAP_DAMAGE
- -1, //RAP_CURSED
- 0, //RAP_STEALTH
- 0 //RAP_MAGICAL_POWER
+ 1, //ARTP_BRAND
+ 0, //ARTP_AC
+ 0, //ARTP_EVASION
+ 0, //ARTP_STRENGTH
+ 0, //ARTP_INTELLIGENCE
+ 0, //ARTP_DEXTERITY
+ 0, //ARTP_FIRE
+ 0, //ARTP_COLD
+ 1, //ARTP_ELECTRICITY
+ 1, //ARTP_POISON
+ 1, //ARTP_NEGATIVE_ENERGY
+ 1, //ARTP_MAGIC
+ 1, //ARTP_EYESIGHT
+ 1, //ARTP_INVISIBLE
+ 1, //ARTP_LEVITATE
+ 1, //ARTP_BLINK
+ 1, //ARTP_CAN_TELEPORT
+ 1, //ARTP_BERSERK
+ 1, //ARTP_MAPPING
+ -1, //ARTP_NOISES
+ -1, //ARTP_PREVENT_SPELLCASTING
+ -1, //ARTP_CAUSE_TELEPORTATION
+ -1, //ARTP_PREVENT_TELEPORTATION
+ -1, //ARTP_ANGRY
+ -1, //ARTP_METABOLISM
+ -1, //ARTP_MUTAGENIC
+ 0, //ARTP_ACCURACY
+ 0, //ARTP_DAMAGE
+ -1, //ARTP_CURSED
+ 0, //ARTP_STEALTH
+ 0 //ARTP_MAGICAL_POWER
};
// No bounds checking to speed things up a bit.
- int all_props[RAP_NUM_PROPERTIES];
- int good_props[RAP_NUM_PROPERTIES];
- int bad_props[RAP_NUM_PROPERTIES];
- for (i = 0; i < RAP_NUM_PROPERTIES; ++i)
+ int all_props[ARTP_NUM_PROPERTIES];
+ int good_props[ARTP_NUM_PROPERTIES];
+ int bad_props[ARTP_NUM_PROPERTIES];
+ for (i = 0; i < ARTP_NUM_PROPERTIES; ++i)
{
all_props[i] = 0;
good_props[i] = 0;
@@ -3541,7 +3541,7 @@ static void _debug_rap_stats(FILE *ostat)
int num_randarts = 0, bad_randarts = 0;
- randart_properties_t proprt;
+ artefact_properties_t proprt;
for (i = 0; i < RANDART_SEED_MASK; ++i)
{
@@ -3556,7 +3556,7 @@ static void _debug_rap_stats(FILE *ostat)
// Generate proprt once and hand it off to randart_is_bad(),
// so that randart_is_bad() doesn't generate it a second time.
- randart_wpn_properties( item, proprt );
+ artefact_wpn_properties( item, proprt );
if (randart_is_bad(item, proprt))
{
bad_randarts++;
@@ -3564,10 +3564,10 @@ static void _debug_rap_stats(FILE *ostat)
}
num_randarts++;
- proprt[RAP_CURSED] = 0;
+ proprt[ARTP_CURSED] = 0;
int num_props = 0, num_good_props = 0, num_bad_props = 0;
- for (int j = 0; j < RAP_NUM_PROPERTIES; ++j)
+ for (int j = 0; j < ARTP_NUM_PROPERTIES; ++j)
{
const int val = proprt[j];
if (val)
@@ -3633,43 +3633,43 @@ static void _debug_rap_stats(FILE *ostat)
(float) total_balance_props / (float) num_randarts);
const char* rap_names[] = {
- "RAP_BRAND",
- "RAP_AC",
- "RAP_EVASION",
- "RAP_STRENGTH",
- "RAP_INTELLIGENCE",
- "RAP_DEXTERITY",
- "RAP_FIRE",
- "RAP_COLD",
- "RAP_ELECTRICITY",
- "RAP_POISON",
- "RAP_NEGATIVE_ENERGY",
- "RAP_MAGIC",
- "RAP_EYESIGHT",
- "RAP_INVISIBLE",
- "RAP_LEVITATE",
- "RAP_BLINK",
- "RAP_CAN_TELEPORT",
- "RAP_BERSERK",
- "RAP_MAPPING",
- "RAP_NOISES",
- "RAP_PREVENT_SPELLCASTING",
- "RAP_CAUSE_TELEPORTATION",
- "RAP_PREVENT_TELEPORTATION",
- "RAP_ANGRY",
- "RAP_METABOLISM",
- "RAP_MUTAGENIC",
- "RAP_ACCURACY",
- "RAP_DAMAGE",
- "RAP_CURSED",
- "RAP_STEALTH",
- "RAP_MAGICAL_POWER"
+ "ARTP_BRAND",
+ "ARTP_AC",
+ "ARTP_EVASION",
+ "ARTP_STRENGTH",
+ "ARTP_INTELLIGENCE",
+ "ARTP_DEXTERITY",
+ "ARTP_FIRE",
+ "ARTP_COLD",
+ "ARTP_ELECTRICITY",
+ "ARTP_POISON",
+ "ARTP_NEGATIVE_ENERGY",
+ "ARTP_MAGIC",
+ "ARTP_EYESIGHT",
+ "ARTP_INVISIBLE",
+ "ARTP_LEVITATE",
+ "ARTP_BLINK",
+ "ARTP_CAN_TELEPORT",
+ "ARTP_BERSERK",
+ "ARTP_MAPPING",
+ "ARTP_NOISES",
+ "ARTP_PREVENT_SPELLCASTING",
+ "ARTP_CAUSE_TELEPORTATION",
+ "ARTP_PREVENT_TELEPORTATION",
+ "ARTP_ANGRY",
+ "ARTP_METABOLISM",
+ "ARTP_MUTAGENIC",
+ "ARTP_ACCURACY",
+ "ARTP_DAMAGE",
+ "ARTP_CURSED",
+ "ARTP_STEALTH",
+ "ARTP_MAGICAL_POWER"
};
fprintf(ostat, " All Good Bad\n");
fprintf(ostat, " --------------------\n");
- for (i = 0; i < RAP_NUM_PROPERTIES; ++i)
+ for (i = 0; i < ARTP_NUM_PROPERTIES; ++i)
{
if (all_props[i] == 0)
continue;
diff --git a/crawl-ref/source/debug.h b/crawl-ref/source/debug.h
index c285d17739..0d122c398e 100644
--- a/crawl-ref/source/debug.h
+++ b/crawl-ref/source/debug.h
@@ -69,7 +69,7 @@ void wizard_create_spec_monster_name(void);
void wizard_create_spec_object(void);
void wizard_tweak_object(void);
void wizard_make_object_randart(void);
-void wizard_value_randart();
+void wizard_value_artefact();
void wizard_uncurse_item();
void wizard_create_all_artefacts();
void wizard_heal(bool super_heal);
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 0e9fc81352..71b46c9d4e 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1434,8 +1434,8 @@ void armour_wear_effects(const int item_slot)
if (!was_known)
{
- if (Options.autoinscribe_randarts && is_random_artefact(arm))
- add_autoinscription( arm, randart_auto_inscription(arm));
+ if (Options.autoinscribe_artefacts && is_random_artefact(arm))
+ add_autoinscription( arm, artefact_auto_inscription(arm));
}
if (!melded)
mprf("You finish putting on %s.", arm.name(DESC_NOCAP_YOUR).c_str());
@@ -1565,7 +1565,7 @@ void armour_wear_effects(const int item_slot)
}
if (is_random_artefact(arm))
- use_randart(arm, melded);
+ use_artefact(arm, melded);
if (item_cursed(arm) && !melded)
{
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 6cb1ef937e..69d39add20 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -160,15 +160,15 @@ const char* jewellery_base_ability_string(int subtype)
struct property_annotators
{
const char* name;
- randart_prop_type prop;
+ artefact_prop_type prop;
int spell_out; // 0: "+3", 1: "+++", 2: value doesn't matter
};
static std::vector<std::string> _randart_propnames( const item_def& item )
{
- randart_properties_t proprt;
- randart_known_props_t known;
- randart_desc_properties( item, proprt, known, true );
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
+ artefact_desc_properties( item, proprt, known, true );
std::vector<std::string> propnames;
@@ -177,48 +177,48 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
// (Generally) negative attributes
// These come first, so they don't get chopped off!
- { "-CAST", RAP_PREVENT_SPELLCASTING, 2 },
- { "-TELE", RAP_PREVENT_TELEPORTATION, 2 },
- { "MUT", RAP_MUTAGENIC, 2 }, // handled specially
- { "*Rage", RAP_ANGRY, 2 },
- { "*TELE", RAP_CAUSE_TELEPORTATION, 2 },
- { "Hunger", RAP_METABOLISM, 2 }, // handled specially
- { "Noisy", RAP_NOISES, 2 },
+ { "-CAST", ARTP_PREVENT_SPELLCASTING, 2 },
+ { "-TELE", ARTP_PREVENT_TELEPORTATION, 2 },
+ { "MUT", ARTP_MUTAGENIC, 2 }, // handled specially
+ { "*Rage", ARTP_ANGRY, 2 },
+ { "*TELE", ARTP_CAUSE_TELEPORTATION, 2 },
+ { "Hunger", ARTP_METABOLISM, 2 }, // handled specially
+ { "Noisy", ARTP_NOISES, 2 },
// Evokable abilities come second
- { "+Blink", RAP_BLINK, 2 },
- { "+Tele", RAP_CAN_TELEPORT, 2 },
- { "+Rage", RAP_BERSERK, 2 },
- { "+Inv", RAP_INVISIBLE, 2 },
- { "+Lev", RAP_LEVITATE, 2 },
- { "+Map", RAP_MAPPING, 2 },
+ { "+Blink", ARTP_BLINK, 2 },
+ { "+Tele", ARTP_CAN_TELEPORT, 2 },
+ { "+Rage", ARTP_BERSERK, 2 },
+ { "+Inv", ARTP_INVISIBLE, 2 },
+ { "+Lev", ARTP_LEVITATE, 2 },
+ { "+Map", ARTP_MAPPING, 2 },
// Resists, also really important
- { "rElec", RAP_ELECTRICITY, 2 },
- { "rPois", RAP_POISON, 2 },
- { "rF", RAP_FIRE, 1 },
- { "rC", RAP_COLD, 1 },
- { "rN", RAP_NEGATIVE_ENERGY, 1 },
- { "MR", RAP_MAGIC, 2 },
+ { "rElec", ARTP_ELECTRICITY, 2 },
+ { "rPois", ARTP_POISON, 2 },
+ { "rF", ARTP_FIRE, 1 },
+ { "rC", ARTP_COLD, 1 },
+ { "rN", ARTP_NEGATIVE_ENERGY, 1 },
+ { "MR", ARTP_MAGIC, 2 },
// Quantitative attributes
- { "AC", RAP_AC, 0 },
- { "EV", RAP_EVASION, 0 },
- { "Str", RAP_STRENGTH, 0 },
- { "Dex", RAP_DEXTERITY, 0 },
- { "Int", RAP_INTELLIGENCE, 0 },
- { "Acc", RAP_ACCURACY, 0 },
- { "Dam", RAP_DAMAGE, 0 },
+ { "AC", ARTP_AC, 0 },
+ { "EV", ARTP_EVASION, 0 },
+ { "Str", ARTP_STRENGTH, 0 },
+ { "Dex", ARTP_DEXTERITY, 0 },
+ { "Int", ARTP_INTELLIGENCE, 0 },
+ { "Acc", ARTP_ACCURACY, 0 },
+ { "Dam", ARTP_DAMAGE, 0 },
// Qualitative attributes
- { "MP", RAP_MAGICAL_POWER, 0 },
- { "SInv", RAP_EYESIGHT, 2 },
- { "Stlth", RAP_STEALTH, 2 }, // handled specially
- { "Curse", RAP_CURSED, 2 },
+ { "MP", ARTP_MAGICAL_POWER, 0 },
+ { "SInv", ARTP_EYESIGHT, 2 },
+ { "Stlth", ARTP_STEALTH, 2 }, // handled specially
+ { "Curse", ARTP_CURSED, 2 },
};
// For randart jewellery, note the base jewellery type if it's not
- // covered by randart_desc_properties()
+ // covered by artefact_desc_properties()
if (item.base_type == OBJ_JEWELLERY
&& item_ident(item, ISFLAG_KNOW_PROPERTIES))
{
@@ -238,7 +238,7 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
// ... and another one for adding a comma if needed.
for (unsigned i = 0; i < ARRAYSZ(propanns); ++i)
if (known_proprt(propanns[i].prop)
- && propanns[i].prop != RAP_BRAND)
+ && propanns[i].prop != ARTP_BRAND)
{
ego += ",";
break;
@@ -258,14 +258,14 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
if (item.base_type == OBJ_JEWELLERY)
{
if (item.sub_type == RING_FIRE
- && (propanns[i].prop == RAP_FIRE && val == 1
- || propanns[i].prop == RAP_COLD && val == -1))
+ && (propanns[i].prop == ARTP_FIRE && val == 1
+ || propanns[i].prop == ARTP_COLD && val == -1))
{
continue;
}
if (item.sub_type == RING_ICE
- && (propanns[i].prop == RAP_COLD && val == 1
- || propanns[i].prop == RAP_FIRE && val == -1))
+ && (propanns[i].prop == ARTP_COLD && val == 1
+ || propanns[i].prop == ARTP_FIRE && val == -1))
{
continue;
}
@@ -285,19 +285,19 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
break;
}
case 2: // e.g. rPois or SInv
- if (propanns[i].prop == RAP_CURSED && val < 1)
+ if (propanns[i].prop == ARTP_CURSED && val < 1)
continue;
work << propanns[i].name;
// these need special handling, so we don't give anything away
- if (propanns[i].prop == RAP_METABOLISM && val > 2
- || propanns[i].prop == RAP_MUTAGENIC && val > 3
- || propanns[i].prop == RAP_STEALTH && val > 20)
+ if (propanns[i].prop == ARTP_METABOLISM && val > 2
+ || propanns[i].prop == ARTP_MUTAGENIC && val > 3
+ || propanns[i].prop == ARTP_STEALTH && val > 20)
{
work << "+";
}
- else if (propanns[i].prop == RAP_STEALTH && val < 0)
+ else if (propanns[i].prop == ARTP_STEALTH && val < 0)
{
if (val < -20)
work << "--";
@@ -314,7 +314,7 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
}
// Remove randart auto-inscription. Do it once for each property
-// string, rather than the return value of randart_auto_inscription(),
+// string, rather than the return value of artefact_auto_inscription(),
// in case more information about the randart has been learned since
// the last auto-inscription.
static void _trim_randart_inscrip( item_def& item )
@@ -329,7 +329,7 @@ static void _trim_randart_inscrip( item_def& item )
trim_string(item.inscription);
}
-std::string randart_auto_inscription( const item_def& item )
+std::string artefact_auto_inscription( const item_def& item )
{
if (item.base_type == OBJ_BOOKS)
return ("");
@@ -358,7 +358,7 @@ void add_autoinscription( item_def &item, std::string ainscrip)
struct property_descriptor
{
- randart_prop_type property;
+ artefact_prop_type property;
const char* desc; // If it contains %d, will be replaced by value.
bool is_graded_resist;
};
@@ -367,47 +367,47 @@ static std::string _randart_descrip( const item_def &item )
{
std::string description;
- randart_properties_t proprt;
- randart_known_props_t known;
- randart_desc_properties( item, proprt, known );
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
+ artefact_desc_properties( item, proprt, known );
const property_descriptor propdescs[] = {
- { RAP_AC, "It affects your AC (%d).", false },
- { RAP_EVASION, "It affects your evasion (%d).", false},
- { RAP_STRENGTH, "It affects your strength (%d).", false},
- { RAP_INTELLIGENCE, "It affects your intelligence (%d).", false},
- { RAP_DEXTERITY, "It affects your dexterity (%d).", false},
- { RAP_ACCURACY, "It affects your accuracy (%d).", false},
- { RAP_DAMAGE, "It affects your damage-dealing abilities (%d).", false},
- { RAP_FIRE, "fire", true},
- { RAP_COLD, "cold", true},
- { RAP_ELECTRICITY, "It insulates you from electricity.", false},
- { RAP_POISON, "It protects you from poison.", false},
- { RAP_NEGATIVE_ENERGY, "negative energy", true},
- { RAP_MAGIC, "It increases your resistance to enchantments.", false},
- { RAP_MAGICAL_POWER, "It affects your mana capacity (%d).", false},
- { RAP_EYESIGHT, "It enhances your eyesight.", false},
- { RAP_INVISIBLE, "It lets you turn invisible.", false},
- { RAP_LEVITATE, "It lets you levitate.", false},
- { RAP_BLINK, "It lets you blink.", false},
- { RAP_CAN_TELEPORT, "It lets you teleport.", false},
- { RAP_BERSERK, "It lets you go berserk.", false},
- { RAP_MAPPING, "It lets you sense your surroundings.", false},
- { RAP_NOISES, "It makes noises.", false},
- { RAP_PREVENT_SPELLCASTING, "It prevents spellcasting.", false},
- { RAP_CAUSE_TELEPORTATION, "It causes teleportation.", false},
- { RAP_PREVENT_TELEPORTATION, "It prevents most forms of teleportation.",
+ { ARTP_AC, "It affects your AC (%d).", false },
+ { ARTP_EVASION, "It affects your evasion (%d).", false},
+ { ARTP_STRENGTH, "It affects your strength (%d).", false},
+ { ARTP_INTELLIGENCE, "It affects your intelligence (%d).", false},
+ { ARTP_DEXTERITY, "It affects your dexterity (%d).", false},
+ { ARTP_ACCURACY, "It affects your accuracy (%d).", false},
+ { ARTP_DAMAGE, "It affects your damage-dealing abilities (%d).", false},
+ { ARTP_FIRE, "fire", true},
+ { ARTP_COLD, "cold", true},
+ { ARTP_ELECTRICITY, "It insulates you from electricity.", false},
+ { ARTP_POISON, "It protects you from poison.", false},
+ { ARTP_NEGATIVE_ENERGY, "negative energy", true},
+ { ARTP_MAGIC, "It increases your resistance to enchantments.", false},
+ { ARTP_MAGICAL_POWER, "It affects your mana capacity (%d).", false},
+ { ARTP_EYESIGHT, "It enhances your eyesight.", false},
+ { ARTP_INVISIBLE, "It lets you turn invisible.", false},
+ { ARTP_LEVITATE, "It lets you levitate.", false},
+ { ARTP_BLINK, "It lets you blink.", false},
+ { ARTP_CAN_TELEPORT, "It lets you teleport.", false},
+ { ARTP_BERSERK, "It lets you go berserk.", false},
+ { ARTP_MAPPING, "It lets you sense your surroundings.", false},
+ { ARTP_NOISES, "It makes noises.", false},
+ { ARTP_PREVENT_SPELLCASTING, "It prevents spellcasting.", false},
+ { ARTP_CAUSE_TELEPORTATION, "It causes teleportation.", false},
+ { ARTP_PREVENT_TELEPORTATION, "It prevents most forms of teleportation.",
false},
- { RAP_ANGRY, "It makes you angry.", false},
- { RAP_CURSED, "It may recurse itself.", false}
+ { ARTP_ANGRY, "It makes you angry.", false},
+ { ARTP_CURSED, "It may recurse itself.", false}
};
for (unsigned i = 0; i < ARRAYSZ(propdescs); ++i)
{
if (known_proprt(propdescs[i].property))
{
- // Only randarts with RAP_CURSED > 0 may recurse themselves.
- if (propdescs[i].property == RAP_CURSED
+ // Only randarts with ARTP_CURSED > 0 may recurse themselves.
+ if (propdescs[i].property == ARTP_CURSED
&& proprt[propdescs[i].property] < 1)
{
continue;
@@ -444,17 +444,17 @@ static std::string _randart_descrip( const item_def &item )
}
// Some special cases which don't fit into the above.
- if (known_proprt( RAP_METABOLISM ))
+ if (known_proprt( ARTP_METABOLISM ))
{
- if (proprt[ RAP_METABOLISM ] >= 3)
+ if (proprt[ ARTP_METABOLISM ] >= 3)
description += "$It greatly speeds your metabolism.";
- else if (proprt[ RAP_METABOLISM ])
+ else if (proprt[ ARTP_METABOLISM ])
description += "$It speeds your metabolism. ";
}
- if (known_proprt( RAP_STEALTH ))
+ if (known_proprt( ARTP_STEALTH ))
{
- const int stval = proprt[RAP_STEALTH];
+ const int stval = proprt[ARTP_STEALTH];
char buf[80];
snprintf(buf, sizeof buf, "$It makes you %s%s stealthy.",
(stval < -20 || stval > 20) ? "much " : "",
@@ -462,9 +462,9 @@ static std::string _randart_descrip( const item_def &item )
description += buf;
}
- if (known_proprt( RAP_MUTAGENIC ))
+ if (known_proprt( ARTP_MUTAGENIC ))
{
- if (proprt[ RAP_MUTAGENIC ] > 3)
+ if (proprt[ ARTP_MUTAGENIC ] > 3)
description += "$It glows with mutagenic radiation.";
else
description += "$It emits mutagenic radiation.";
@@ -2335,7 +2335,7 @@ void inscribe_item(item_def &item, bool proper_prompt)
bool need_autoinscribe = false;
if (is_random_artefact(item))
{
- ainscrip = randart_auto_inscription(item);
+ ainscrip = artefact_auto_inscription(item);
if (!ainscrip.empty()
&& (!is_inscribed
|| item.inscription.find(ainscrip) == std::string::npos))
diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h
index d3a1b5b188..cbaa819907 100644
--- a/crawl-ref/source/describe.h
+++ b/crawl-ref/source/describe.h
@@ -113,7 +113,7 @@ void print_description(const describe_info &inf);
template<class T> void process_description(T &proc, const describe_info &inf);
-std::string randart_auto_inscription( const item_def& item );
+std::string artefact_auto_inscription( const item_def& item );
void add_autoinscription( item_def &item, std::string ainscrip);
const char *trap_name(trap_type trap);
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 7fd6a699ba..015ed895fe 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1661,14 +1661,14 @@ bool acquirement(object_class_type class_wanted, int agent,
if ((agent == GOD_TROG || agent == GOD_OKAWARU)
&& is_random_artefact(doodad))
{
- randart_properties_t proprt;
- randart_wpn_properties( doodad, proprt );
+ artefact_properties_t proprt;
+ artefact_wpn_properties( doodad, proprt );
// Check vs. stats. positive stats will automatically fall
// through. As will negative stats that won't kill you.
- if (-proprt[RAP_STRENGTH] >= you.strength
- || -proprt[RAP_INTELLIGENCE] >= you.intel
- || -proprt[RAP_DEXTERITY] >= you.dex)
+ if (-proprt[ARTP_STRENGTH] >= you.strength
+ || -proprt[ARTP_INTELLIGENCE] >= you.intel
+ || -proprt[ARTP_DEXTERITY] >= you.dex)
{
// Try again.
destroy_item(thing_created);
@@ -1856,7 +1856,7 @@ bool acquirement(object_class_type class_wanted, int agent,
{
// Give another name that takes god gift into account;
// artefact books already do that.
- thing.props["randart_name"].get_string() =
+ thing.props["artefact_name"].get_string() =
artefact_name(thing, false);
}
}
@@ -3282,15 +3282,15 @@ void handle_time(long time_delta)
}
bool mutagenic_randart = false;
- if (const int randart_glow = scan_randarts(RAP_MUTAGENIC))
+ if (const int artefact_glow = scan_artefacts(ARTP_MUTAGENIC))
{
// Reduced randart glow. Note that one randart will contribute
- // 2 - 5 units of glow to randart_glow. A randart with a mutagen
+ // 2 - 5 units of glow to artefact_glow. A randart with a mutagen
// index of 2 does about 0.58 points of contamination per turn.
// A randart with a mutagen index of 5 does about 0.7 points of
// contamination per turn.
- const int mean_glow = 500 + randart_glow * 40;
+ const int mean_glow = 500 + artefact_glow * 40;
const int actual_glow = mean_glow / 2 + random2(mean_glow);
added_contamination += div_rand_round(actual_glow, 1000);
mutagenic_randart = true;
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index da71bb4991..9d8bbf4671 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2439,40 +2439,40 @@ enum pronoun_type
PRONOUN_OBJECTIVE // 5 (objective is always lowercase)
};
-enum randart_prop_type
-{
- RAP_BRAND, // 0
- RAP_AC,
- RAP_EVASION,
- RAP_STRENGTH,
- RAP_INTELLIGENCE,
- RAP_DEXTERITY, // 5
- RAP_FIRE,
- RAP_COLD,
- RAP_ELECTRICITY,
- RAP_POISON,
- RAP_NEGATIVE_ENERGY, // 10
- RAP_MAGIC,
- RAP_EYESIGHT,
- RAP_INVISIBLE,
- RAP_LEVITATE,
- RAP_BLINK, // 15
- RAP_CAN_TELEPORT,
- RAP_BERSERK,
- RAP_MAPPING,
- RAP_NOISES,
- RAP_PREVENT_SPELLCASTING, // 20
- RAP_CAUSE_TELEPORTATION,
- RAP_PREVENT_TELEPORTATION,
- RAP_ANGRY,
- RAP_METABOLISM,
- RAP_MUTAGENIC, // 25
- RAP_ACCURACY,
- RAP_DAMAGE,
- RAP_CURSED,
- RAP_STEALTH,
- RAP_MAGICAL_POWER, // 30
- RAP_NUM_PROPERTIES
+enum artefact_prop_type
+{
+ ARTP_BRAND, // 0
+ ARTP_AC,
+ ARTP_EVASION,
+ ARTP_STRENGTH,
+ ARTP_INTELLIGENCE,
+ ARTP_DEXTERITY, // 5
+ ARTP_FIRE,
+ ARTP_COLD,
+ ARTP_ELECTRICITY,
+ ARTP_POISON,
+ ARTP_NEGATIVE_ENERGY, // 10
+ ARTP_MAGIC,
+ ARTP_EYESIGHT,
+ ARTP_INVISIBLE,
+ ARTP_LEVITATE,
+ ARTP_BLINK, // 15
+ ARTP_CAN_TELEPORT,
+ ARTP_BERSERK,
+ ARTP_MAPPING,
+ ARTP_NOISES,
+ ARTP_PREVENT_SPELLCASTING, // 20
+ ARTP_CAUSE_TELEPORTATION,
+ ARTP_PREVENT_TELEPORTATION,
+ ARTP_ANGRY,
+ ARTP_METABOLISM,
+ ARTP_MUTAGENIC, // 25
+ ARTP_ACCURACY,
+ ARTP_DAMAGE,
+ ARTP_CURSED,
+ ARTP_STEALTH,
+ ARTP_MAGICAL_POWER, // 30
+ ARTP_NUM_PROPERTIES
};
enum score_format_type
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index e24e96cc73..b71a7ba3c2 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -2056,7 +2056,7 @@ public:
std::vector<text_pattern> note_items; // Objects to note
std::vector<int> note_skill_levels; // Skill levels to note
- bool autoinscribe_randarts; // Auto-inscribe identified randarts.
+ bool autoinscribe_artefacts; // Auto-inscribe identified artefacts.
bool pickup_thrown; // Pickup thrown missiles
bool pickup_dropped; // Pickup dropped objects
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index d9346d1c60..838dbc1465 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -377,7 +377,7 @@ void melee_attack::init_attack()
if (weapon && weapon->base_type == OBJ_WEAPONS
&& is_random_artefact( *weapon ))
{
- randart_wpn_properties( *weapon, art_props );
+ artefact_wpn_properties( *weapon, art_props );
}
wpn_skill = weapon ? weapon_skill( *weapon ) : SK_UNARMED_COMBAT;
@@ -529,8 +529,8 @@ bool melee_attack::is_water_attack(const actor *attk,
void melee_attack::check_autoberserk()
{
if (weapon
- && art_props[RAP_ANGRY] >= 1
- && !one_chance_in(1 + art_props[RAP_ANGRY]))
+ && art_props[ARTP_ANGRY] >= 1
+ && !one_chance_in(1 + art_props[ARTP_ANGRY]))
{
attacker->go_berserk(false);
}
@@ -2252,7 +2252,7 @@ bool melee_attack::distortion_affects_defender()
// the player goes to Abyss, while the weapon object is
// still in memory.
if (is_random_artefact(*weapon))
- randart_wpn_learn_prop(*weapon, RAP_BRAND);
+ artefact_wpn_learn_prop(*weapon, ARTP_BRAND);
else
set_ident_flags(*weapon, ISFLAG_KNOW_TYPE);
}
@@ -3008,7 +3008,7 @@ bool melee_attack::apply_damage_brand()
if (weapon)
{
if (is_random_artefact(*weapon))
- brand_was_known = randart_known_wpn_property(*weapon, RAP_BRAND);
+ brand_was_known = artefact_known_wpn_property(*weapon, ARTP_BRAND);
else
brand_was_known = item_type_known(*weapon);
}
@@ -3289,7 +3289,7 @@ bool melee_attack::apply_damage_brand()
&& !is_unrandom_artefact(*weapon) && !is_fixed_artefact(*weapon))
{
if (is_random_artefact(*weapon))
- randart_wpn_learn_prop(*weapon, RAP_BRAND);
+ artefact_wpn_learn_prop(*weapon, ARTP_BRAND);
else
set_ident_flags(*weapon, ISFLAG_KNOW_TYPE);
}
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h
index 0a1326b504..856be31b18 100644
--- a/crawl-ref/source/fight.h
+++ b/crawl-ref/source/fight.h
@@ -109,7 +109,7 @@ public:
bool hand_half_bonus;
// If weapon is a randart, its properties.
- randart_properties_t art_props;
+ artefact_properties_t art_props;
// Attack messages
std::string attack_verb, verb_degree;
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index a9390b6d4f..543eabffc5 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -232,7 +232,7 @@ static bool _find_butchering_implement(int &butcher_tool)
// Don't even suggest autocursing items.
// Note that unknown autocursing is OK.
&& (!is_random_artefact(tool)
- || (randart_known_wpn_property(tool, RAP_CURSED) <= 0)))
+ || (artefact_known_wpn_property(tool, ARTP_CURSED) <= 0)))
{
if (Options.easy_butcher
&& item_known_uncursed(tool)
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 30e77385b6..792e6034ca 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -974,7 +974,7 @@ void game_options::reset_options()
note_monsters.clear();
note_messages.clear();
autoinscriptions.clear();
- autoinscribe_randarts = true;
+ autoinscribe_artefacts = true;
note_items.clear();
note_skill_levels.clear();
travel_stop_message.clear();
@@ -2555,7 +2555,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
autoinscriptions.push_back(
std::pair<text_pattern,std::string>(thesplit[0], thesplit[1]));
}
- else BOOL_OPTION(autoinscribe_randarts);
+ else BOOL_OPTION(autoinscribe_artefacts);
else if (key == "map_file_name")
{
map_file_name = field;
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 737e1f59cf..30c7db0c0e 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -451,7 +451,7 @@ bool unwield_item(bool showMsgs)
const int brand = get_weapon_brand( item );
if (is_random_artefact( item ))
- unuse_randart(item);
+ unuse_artefact(item);
if (brand != SPWPN_NORMAL)
{
@@ -620,55 +620,55 @@ void unwear_armour(int slot)
}
if (is_random_artefact(item))
- unuse_randart(item);
+ unuse_artefact(item);
}
-void unuse_randart(const item_def &item)
+void unuse_artefact(const item_def &item)
{
ASSERT( is_random_artefact( item ) );
- randart_properties_t proprt;
- randart_known_props_t known;
- randart_wpn_properties( item, proprt, known );
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
+ artefact_wpn_properties( item, proprt, known );
- if (proprt[RAP_AC])
+ if (proprt[ARTP_AC])
{
you.redraw_armour_class = true;
- if (!known[RAP_AC])
+ if (!known[ARTP_AC])
{
mprf("You feel less %s.",
- proprt[RAP_AC] > 0? "well-protected" : "vulnerable");
+ proprt[ARTP_AC] > 0? "well-protected" : "vulnerable");
}
}
- if (proprt[RAP_EVASION])
+ if (proprt[ARTP_EVASION])
{
you.redraw_evasion = true;
- if (!known[RAP_EVASION])
+ if (!known[ARTP_EVASION])
{
mprf("You feel less %s.",
- proprt[RAP_EVASION] > 0? "nimble" : "awkward");
+ proprt[ARTP_EVASION] > 0? "nimble" : "awkward");
}
}
- if (proprt[RAP_MAGICAL_POWER])
+ if (proprt[ARTP_MAGICAL_POWER])
{
you.redraw_magic_points = true;
- if (!known[RAP_MAGICAL_POWER])
+ if (!known[ARTP_MAGICAL_POWER])
{
mprf("You feel your mana capacity %s.",
- proprt[RAP_MAGICAL_POWER] > 0 ? "decrease" : "increase");
+ proprt[ARTP_MAGICAL_POWER] > 0 ? "decrease" : "increase");
}
}
// Modify ability scores; always output messages.
- modify_stat( STAT_STRENGTH, -proprt[RAP_STRENGTH], false, item,
+ modify_stat( STAT_STRENGTH, -proprt[ARTP_STRENGTH], false, item,
true);
- modify_stat( STAT_INTELLIGENCE, -proprt[RAP_INTELLIGENCE], false, item,
+ modify_stat( STAT_INTELLIGENCE, -proprt[ARTP_INTELLIGENCE], false, item,
true);
- modify_stat( STAT_DEXTERITY, -proprt[RAP_DEXTERITY], false, item,
+ modify_stat( STAT_DEXTERITY, -proprt[ARTP_DEXTERITY], false, item,
true);
- if (proprt[RAP_NOISES] != 0)
+ if (proprt[ARTP_NOISES] != 0)
you.special_wield = SPWLD_NONE;
}
diff --git a/crawl-ref/source/it_use2.h b/crawl-ref/source/it_use2.h
index 80bc1bf5b3..f3f4161eca 100644
--- a/crawl-ref/source/it_use2.h
+++ b/crawl-ref/source/it_use2.h
@@ -17,7 +17,7 @@
bool potion_effect(potion_type pot_eff, int pow,
bool drank_it = false, bool was_known = true);
-void unuse_randart(const item_def &item);
+void unuse_artefact(const item_def &item);
void unwear_armour(int slot);
bool unwield_item(bool showMsgs = true);
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 0fdd3e0d8d..37ab147cc9 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -444,7 +444,7 @@ int item_special_wield_effect(const item_def &item)
int i_eff = SPWPN_NORMAL;
if (is_random_artefact( item ))
- i_eff = randart_wpn_property(item, RAP_BRAND);
+ i_eff = artefact_wpn_property(item, ARTP_BRAND);
else
i_eff = item.special;
@@ -552,14 +552,14 @@ void wield_effects(int item_wield_2, bool showMsgs)
if (artefact)
{
- special = randart_wpn_property(item, RAP_BRAND);
- use_randart(item_wield_2);
+ special = artefact_wpn_property(item, ARTP_BRAND);
+ use_artefact(item_wield_2);
if (!was_known)
{
item.flags |= ISFLAG_NOTED_ID;
- if (Options.autoinscribe_randarts)
- add_autoinscription(item, randart_auto_inscription(item));
+ if (Options.autoinscribe_artefacts)
+ add_autoinscription(item, artefact_auto_inscription(item));
// Make a note of it.
take_note(Note(NOTE_ID_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(),
@@ -3132,7 +3132,7 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where,
void jewellery_wear_effects(item_def &item)
{
item_type_id_state_type ident = ID_TRIED_TYPE;
- randart_prop_type fake_rap = RAP_NUM_PROPERTIES;
+ artefact_prop_type fake_rap = ARTP_NUM_PROPERTIES;
bool learn_pluses = false;
// Randart jewellery shouldn't auto-ID just because the base type
@@ -3183,7 +3183,7 @@ void jewellery_wear_effects(item_def &item)
{
mpr("You become transparent for a moment.");
if (artefact)
- fake_rap = RAP_INVISIBLE;
+ fake_rap = ARTP_INVISIBLE;
else
ident = ID_KNOWN_TYPE;
}
@@ -3207,7 +3207,7 @@ void jewellery_wear_effects(item_def &item)
modify_stat(STAT_STRENGTH, item.plus, false, item);
if (artefact)
- fake_rap = RAP_STRENGTH;
+ fake_rap = ARTP_STRENGTH;
else
ident = ID_KNOWN_TYPE;
@@ -3221,7 +3221,7 @@ void jewellery_wear_effects(item_def &item)
modify_stat(STAT_DEXTERITY, item.plus, false, item);
if (artefact)
- fake_rap = RAP_DEXTERITY;
+ fake_rap = ARTP_DEXTERITY;
else
ident = ID_KNOWN_TYPE;
@@ -3235,7 +3235,7 @@ void jewellery_wear_effects(item_def &item)
modify_stat(STAT_INTELLIGENCE, item.plus, false, item);
if (artefact)
- fake_rap = RAP_INTELLIGENCE;
+ fake_rap = ARTP_INTELLIGENCE;
else
ident = ID_KNOWN_TYPE;
@@ -3247,42 +3247,42 @@ void jewellery_wear_effects(item_def &item)
mpr("You feel your mana capacity increase.");
calc_mp();
if (artefact)
- fake_rap = RAP_MAGICAL_POWER;
+ fake_rap = ARTP_MAGICAL_POWER;
else
ident = ID_KNOWN_TYPE;
break;
case RING_LEVITATION:
- if (!scan_randarts(RAP_LEVITATE))
+ if (!scan_artefacts(ARTP_LEVITATE))
{
if (player_is_airborne())
mpr("You feel vaguely more buoyant than before.");
else
mpr("You feel buoyant.");
if (artefact)
- fake_rap = RAP_LEVITATE;
+ fake_rap = ARTP_LEVITATE;
else
ident = ID_KNOWN_TYPE;
}
break;
case RING_TELEPORTATION:
- if (!scan_randarts(RAP_CAN_TELEPORT))
+ if (!scan_artefacts(ARTP_CAN_TELEPORT))
{
mpr("You feel slightly jumpy.");
if (artefact)
- fake_rap = RAP_CAUSE_TELEPORTATION;
+ fake_rap = ARTP_CAUSE_TELEPORTATION;
else
ident = ID_KNOWN_TYPE;
}
break;
case AMU_RAGE:
- if (!scan_randarts(RAP_BERSERK))
+ if (!scan_artefacts(ARTP_BERSERK))
{
mpr("You feel a brief urge to hack something to bits.");
if (artefact)
- fake_rap = RAP_BERSERK;
+ fake_rap = ARTP_BERSERK;
else
ident = ID_KNOWN_TYPE;
}
@@ -3306,13 +3306,13 @@ void jewellery_wear_effects(item_def &item)
// so we don't allow them to make the base types known.
if (artefact)
{
- use_randart(item);
+ use_artefact(item);
if (learn_pluses && (item.plus != 0 || item.plus2 != 0))
set_ident_flags(item, ISFLAG_KNOW_PLUSES);
- if (fake_rap != RAP_NUM_PROPERTIES)
- randart_wpn_learn_prop(item, fake_rap);
+ if (fake_rap != ARTP_NUM_PROPERTIES)
+ artefact_wpn_learn_prop(item, fake_rap);
if (!item.props.exists("jewellery_tried")
|| !item.props["jewellery_tried"].get_bool())
@@ -3431,9 +3431,9 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
if (is_random_artefact(item))
{
- prop_str += randart_known_wpn_property(item, RAP_STRENGTH);
- prop_int += randart_known_wpn_property(item, RAP_INTELLIGENCE);
- prop_dex += randart_known_wpn_property(item, RAP_DEXTERITY);
+ prop_str += artefact_known_wpn_property(item, ARTP_STRENGTH);
+ prop_int += artefact_known_wpn_property(item, ARTP_INTELLIGENCE);
+ prop_dex += artefact_known_wpn_property(item, ARTP_DEXTERITY);
}
if (remove)
@@ -3730,7 +3730,7 @@ void jewellery_remove_effects(item_def &item, bool mesg)
}
if (is_random_artefact(item))
- unuse_randart(item);
+ unuse_artefact(item);
// Must occur after ring is removed. -- bwr
calc_mp();
@@ -5251,12 +5251,12 @@ void examine_object(void)
mesclr(true);
} // end original_name()
-void use_randart(unsigned char item_wield_2)
+void use_artefact(unsigned char item_wield_2)
{
- use_randart( you.inv[ item_wield_2 ] );
+ use_artefact( you.inv[ item_wield_2 ] );
}
-void use_randart(item_def &item, bool unmeld)
+void use_artefact(item_def &item, bool unmeld)
{
#define unknown_proprt(prop) (proprt[(prop)] && !known[(prop)])
@@ -5265,102 +5265,102 @@ void use_randart(item_def &item, bool unmeld)
const bool alreadyknown = item_type_known(item);
const bool dangerous = player_in_a_dangerous_place();
- randart_properties_t proprt;
- randart_known_props_t known;
- randart_wpn_properties( item, proprt, known );
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
+ artefact_wpn_properties( item, proprt, known );
// Only give property messages for previously unknown properties.
- if (proprt[RAP_AC])
+ if (proprt[ARTP_AC])
{
you.redraw_armour_class = true;
- if (!known[RAP_AC])
+ if (!known[ARTP_AC])
{
- mprf("You feel %s.", proprt[RAP_AC] > 0?
+ mprf("You feel %s.", proprt[ARTP_AC] > 0?
"well-protected" : "more vulnerable");
- randart_wpn_learn_prop(item, RAP_AC);
+ artefact_wpn_learn_prop(item, ARTP_AC);
}
}
- if (proprt[RAP_EVASION])
+ if (proprt[ARTP_EVASION])
{
you.redraw_evasion = true;
- if (!known[RAP_EVASION])
+ if (!known[ARTP_EVASION])
{
- mprf("You feel somewhat %s.", proprt[RAP_EVASION] > 0?
+ mprf("You feel somewhat %s.", proprt[ARTP_EVASION] > 0?
"nimbler" : "more awkward");
- randart_wpn_learn_prop(item, RAP_EVASION);
+ artefact_wpn_learn_prop(item, ARTP_EVASION);
}
}
- if (proprt[RAP_MAGICAL_POWER])
+ if (proprt[ARTP_MAGICAL_POWER])
{
you.redraw_magic_points = true;
- if (!known[RAP_MAGICAL_POWER])
+ if (!known[ARTP_MAGICAL_POWER])
{
mprf("You feel your mana capacity %s.",
- proprt[RAP_MAGICAL_POWER] > 0? "increase" : "decrease");
- randart_wpn_learn_prop(item, RAP_MAGICAL_POWER);
+ proprt[ARTP_MAGICAL_POWER] > 0? "increase" : "decrease");
+ artefact_wpn_learn_prop(item, ARTP_MAGICAL_POWER);
}
}
// Modify ability scores.
// Output result even when identified (because of potential fatality).
- modify_stat( STAT_STRENGTH, proprt[RAP_STRENGTH], false, item );
- modify_stat( STAT_INTELLIGENCE, proprt[RAP_INTELLIGENCE], false, item );
- modify_stat( STAT_DEXTERITY, proprt[RAP_DEXTERITY], false, item );
+ modify_stat( STAT_STRENGTH, proprt[ARTP_STRENGTH], false, item );
+ modify_stat( STAT_INTELLIGENCE, proprt[ARTP_INTELLIGENCE], false, item );
+ modify_stat( STAT_DEXTERITY, proprt[ARTP_DEXTERITY], false, item );
- const randart_prop_type stat_props[3] =
- {RAP_STRENGTH, RAP_INTELLIGENCE, RAP_DEXTERITY};
+ const artefact_prop_type stat_props[3] =
+ {ARTP_STRENGTH, ARTP_INTELLIGENCE, ARTP_DEXTERITY};
for (int i = 0; i < 3; i++)
if (unknown_proprt(stat_props[i]))
- randart_wpn_learn_prop(item, stat_props[i]);
+ artefact_wpn_learn_prop(item, stat_props[i]);
// For evokable stuff, check whether other equipped items yield
// the same ability. If not, and if the ability granted hasn't
// already been discovered, give a message.
- if (unknown_proprt(RAP_LEVITATE)
- && !items_give_ability(item.link, RAP_LEVITATE))
+ if (unknown_proprt(ARTP_LEVITATE)
+ && !items_give_ability(item.link, ARTP_LEVITATE))
{
if (player_is_airborne())
mpr("You feel vaguely more buoyant than before.");
else
mpr("You feel buoyant.");
- randart_wpn_learn_prop(item, RAP_LEVITATE);
+ artefact_wpn_learn_prop(item, ARTP_LEVITATE);
}
- if (unknown_proprt(RAP_INVISIBLE) && !you.duration[DUR_INVIS])
+ if (unknown_proprt(ARTP_INVISIBLE) && !you.duration[DUR_INVIS])
{
mpr("You become transparent for a moment.");
- randart_wpn_learn_prop(item, RAP_INVISIBLE);
+ artefact_wpn_learn_prop(item, ARTP_INVISIBLE);
}
- if (unknown_proprt(RAP_CAN_TELEPORT)
- && !items_give_ability(item.link, RAP_CAN_TELEPORT))
+ if (unknown_proprt(ARTP_CAN_TELEPORT)
+ && !items_give_ability(item.link, ARTP_CAN_TELEPORT))
{
mpr("You feel slightly jumpy.");
- randart_wpn_learn_prop(item, RAP_CAN_TELEPORT);
+ artefact_wpn_learn_prop(item, ARTP_CAN_TELEPORT);
}
- if (unknown_proprt(RAP_BERSERK)
- && !items_give_ability(item.link, RAP_BERSERK))
+ if (unknown_proprt(ARTP_BERSERK)
+ && !items_give_ability(item.link, ARTP_BERSERK))
{
mpr("You feel a brief urge to hack something to bits.");
- randart_wpn_learn_prop(item, RAP_BERSERK);
+ artefact_wpn_learn_prop(item, ARTP_BERSERK);
}
- if (!unmeld && !item_cursed(item) && proprt[RAP_CURSED] > 0
- && one_chance_in(proprt[RAP_CURSED]))
+ if (!unmeld && !item_cursed(item) && proprt[ARTP_CURSED] > 0
+ && one_chance_in(proprt[ARTP_CURSED]))
{
do_curse_item( item, false );
- randart_wpn_learn_prop(item, RAP_CURSED);
+ artefact_wpn_learn_prop(item, ARTP_CURSED);
}
- if (proprt[RAP_NOISES])
+ if (proprt[ARTP_NOISES])
you.special_wield = SPWLD_NOISE;
- if (!alreadyknown && Options.autoinscribe_randarts)
- add_autoinscription(item, randart_auto_inscription(item));
+ if (!alreadyknown && Options.autoinscribe_artefacts)
+ add_autoinscription(item, artefact_auto_inscription(item));
if (!alreadyknown && dangerous)
{
diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h
index ac7a1c8d80..973286ed52 100644
--- a/crawl-ref/source/item_use.h
+++ b/crawl-ref/source/item_use.h
@@ -156,8 +156,8 @@ void wield_effects(int item_wield_2, bool showMsgs);
/* ***********************************************************************
* called from: delay.cc item_use.cc it_use2.cc
* *********************************************************************** */
-void use_randart( unsigned char item_wield_2 );
-void use_randart(item_def &item, bool unmeld = false);
+void use_artefact( unsigned char item_wield_2 );
+void use_artefact(item_def &item, bool unmeld = false);
bool puton_item(int slot);
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 387fd72b18..7c54b7fd4c 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -918,7 +918,7 @@ int get_weapon_brand( const item_def &item )
}
else if (is_random_artefact( item ))
{
- return (randart_wpn_property( item, RAP_BRAND ));
+ return (artefact_wpn_property( item, ARTP_BRAND ));
}
return (item.special);
@@ -2467,9 +2467,12 @@ bool gives_ability(const item_def &item)
return (false);
// Check for evokable randart properties.
- for (int rap = RAP_INVISIBLE; rap <= RAP_MAPPING; rap++)
- if (randart_wpn_property( item, static_cast<randart_prop_type>(rap) ))
+ for (int rap = ARTP_INVISIBLE; rap <= ARTP_MAPPING; rap++)
+ if (artefact_wpn_property( item,
+ static_cast<artefact_prop_type>(rap) ))
+ {
return (true);
+ }
return (false);
}
@@ -2531,13 +2534,16 @@ bool gives_resistance(const item_def &item)
return (false);
// Check for randart resistances.
- for (int rap = RAP_FIRE; rap <= RAP_CAN_TELEPORT; rap++)
+ for (int rap = ARTP_FIRE; rap <= ARTP_CAN_TELEPORT; rap++)
{
- if (rap == RAP_MAGIC || rap >= RAP_INVISIBLE && rap != RAP_CAN_TELEPORT)
+ if (rap == ARTP_MAGIC || rap >= ARTP_INVISIBLE && rap != ARTP_CAN_TELEPORT)
continue;
- if (randart_wpn_property( item, static_cast<randart_prop_type>(rap) ))
+ if (artefact_wpn_property( item,
+ static_cast<artefact_prop_type>(rap) ))
+ {
return (true);
+ }
}
return (false);
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 5bc02bd5f3..a1ef5927d8 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -342,7 +342,7 @@ bool mons_class_flag(int mc, int bf)
}
static int _scan_mon_inv_randarts(const monsters *mon,
- randart_prop_type ra_prop)
+ artefact_prop_type ra_prop)
{
int ret = 0;
@@ -356,25 +356,25 @@ static int _scan_mon_inv_randarts(const monsters *mon,
if (weapon != NON_ITEM && mitm[weapon].base_type == OBJ_WEAPONS
&& is_random_artefact(mitm[weapon]))
{
- ret += randart_wpn_property(mitm[weapon], ra_prop);
+ ret += artefact_wpn_property(mitm[weapon], ra_prop);
}
if (second != NON_ITEM && mitm[second].base_type == OBJ_WEAPONS
&& is_random_artefact(mitm[second]))
{
- ret += randart_wpn_property(mitm[second], ra_prop);
+ ret += artefact_wpn_property(mitm[second], ra_prop);
}
if (armour != NON_ITEM && mitm[armour].base_type == OBJ_ARMOUR
&& is_random_artefact(mitm[armour]))
{
- ret += randart_wpn_property(mitm[armour], ra_prop);
+ ret += artefact_wpn_property(mitm[armour], ra_prop);
}
if (shield != NON_ITEM && mitm[shield].base_type == OBJ_ARMOUR
&& is_random_artefact(mitm[shield]))
{
- ret += randart_wpn_property(mitm[shield], ra_prop);
+ ret += artefact_wpn_property(mitm[shield], ra_prop);
}
}
@@ -844,7 +844,7 @@ bool mons_see_invis(const monsters *mon)
return (mon->ghost->see_invis);
else if (mons_class_flag(mon->type, M_SEE_INVIS))
return (true);
- else if (_scan_mon_inv_randarts(mon, RAP_EYESIGHT) > 0)
+ else if (_scan_mon_inv_randarts(mon, ARTP_EYESIGHT) > 0)
return (true);
return (false);
@@ -1142,7 +1142,7 @@ int mons_resist_magic( const monsters *mon )
u = mon->hit_dice * -u * 4 / 3;
// Randarts have a multiplicative effect.
- u *= (_scan_mon_inv_randarts( mon, RAP_MAGIC ) + 100);
+ u *= (_scan_mon_inv_randarts( mon, ARTP_MAGIC ) + 100);
u /= 100;
// ego armour resistance
@@ -1222,7 +1222,7 @@ int mons_res_elec(const monsters *mon)
// Don't bother checking equipment if the monster can't use it.
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
- u += _scan_mon_inv_randarts(mon, RAP_ELECTRICITY);
+ u += _scan_mon_inv_randarts(mon, ARTP_ELECTRICITY);
// No ego armour, but storm dragon.
const int armour = mon->inv[MSLOT_ARMOUR];
@@ -1258,7 +1258,7 @@ int mons_res_poison(const monsters *mon)
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
- u += _scan_mon_inv_randarts( mon, RAP_POISON );
+ u += _scan_mon_inv_randarts( mon, ARTP_POISON );
const int armour = mon->inv[MSLOT_ARMOUR];
const int shield = mon->inv[MSLOT_SHIELD];
@@ -1315,7 +1315,7 @@ int mons_res_fire(const monsters *mon)
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
- u += _scan_mon_inv_randarts(mon, RAP_FIRE);
+ u += _scan_mon_inv_randarts(mon, ARTP_FIRE);
const int armour = mon->inv[MSLOT_ARMOUR];
const int shield = mon->inv[MSLOT_SHIELD];
@@ -1360,7 +1360,7 @@ int mons_res_cold(const monsters *mon)
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
- u += _scan_mon_inv_randarts(mon, RAP_COLD);
+ u += _scan_mon_inv_randarts(mon, ARTP_COLD);
const int armour = mon->inv[MSLOT_ARMOUR];
const int shield = mon->inv[MSLOT_SHIELD];
@@ -1423,7 +1423,7 @@ int mons_res_negative_energy(const monsters *mon)
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
- u += _scan_mon_inv_randarts(mon, RAP_NEGATIVE_ENERGY);
+ u += _scan_mon_inv_randarts(mon, ARTP_NEGATIVE_ENERGY);
const int armour = mon->inv[MSLOT_ARMOUR];
const int shield = mon->inv[MSLOT_SHIELD];
@@ -1513,7 +1513,7 @@ flight_type mons_flies(const monsters *mon, bool randarts)
ret = mons_class_flies(mon->type);
if (randarts && ret == FL_NONE
- && _scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0)
+ && _scan_mon_inv_randarts(mon, ARTP_LEVITATE) > 0)
{
ret = FL_LEVITATE;
}
@@ -4179,7 +4179,7 @@ void monsters::equip_weapon(item_def &item, int near, bool msg)
if (message_given)
{
if (is_random_artefact(item))
- randart_wpn_learn_prop(item, RAP_BRAND);
+ artefact_wpn_learn_prop(item, ARTP_BRAND);
else
set_ident_flags(item, ISFLAG_KNOW_TYPE);
}
@@ -4278,7 +4278,7 @@ void monsters::unequip_weapon(item_def &item, int near, bool msg)
if (message_given)
{
if (is_random_artefact(item))
- randart_wpn_learn_prop(item, RAP_BRAND);
+ artefact_wpn_learn_prop(item, ARTP_BRAND);
else
set_ident_flags(item, ISFLAG_KNOW_TYPE);
}
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index ddff3fdc7c..43176d8c9b 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -2137,7 +2137,7 @@ static std::vector<formatted_string> _get_overview_resistances(
_determine_colour_string(rclar, 1), itosym1(rclar));
cols.add_formatted(1, buf, false);
- if (scan_randarts(RAP_PREVENT_TELEPORTATION, calc_unid))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION, calc_unid))
{
snprintf(buf, sizeof buf, "\n%sPrev.Telep.: %s",
_determine_colour_string(-1, 1), itosym1(1));
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index c47b0de6d2..cd667ba334 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1033,7 +1033,7 @@ int player_teleport(bool calc_unid)
&& you.weapon()->base_type == OBJ_WEAPONS
&& is_random_artefact(*you.weapon()))
{
- tp += scan_randarts(RAP_CAUSE_TELEPORTATION, calc_unid);
+ tp += scan_artefacts(ARTP_CAUSE_TELEPORTATION, calc_unid);
}
return tp;
@@ -1179,7 +1179,7 @@ int player_hunger_rate(void)
hunger += player_equip( EQ_BODY_ARMOUR, ARM_TROLL_LEATHER_ARMOUR );
// randarts
- hunger += scan_randarts(RAP_METABOLISM);
+ hunger += scan_artefacts(ARTP_METABOLISM);
// burden
hunger += you.burden_state;
@@ -1263,7 +1263,7 @@ int player_res_magic(void)
}
// randarts
- rm += scan_randarts(RAP_MAGIC);
+ rm += scan_artefacts(ARTP_MAGIC);
// armour
rm += 30 * player_equip_ego_type(EQ_ALL_ARMOUR, SPARM_MAGIC_RESISTANCE);
@@ -1331,7 +1331,7 @@ int player_res_fire(bool calc_unid, bool temp, bool items)
rf += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_RESISTANCE );
// randart weapons:
- rf += scan_randarts(RAP_FIRE, calc_unid);
+ rf += scan_artefacts(ARTP_FIRE, calc_unid);
}
// species:
@@ -1441,7 +1441,7 @@ int player_res_cold(bool calc_unid, bool temp, bool items)
rc += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_RESISTANCE );
// randart weapons:
- rc += scan_randarts(RAP_COLD, calc_unid);
+ rc += scan_artefacts(ARTP_COLD, calc_unid);
}
// mutations:
@@ -1525,7 +1525,7 @@ int player_res_electricity(bool calc_unid, bool temp, bool items)
re += player_equip( EQ_BODY_ARMOUR, ARM_STORM_DRAGON_ARMOUR );
// randart weapons:
- re += scan_randarts(RAP_ELECTRICITY, calc_unid);
+ re += scan_artefacts(ARTP_ELECTRICITY, calc_unid);
}
// species:
@@ -1601,7 +1601,7 @@ int player_res_poison(bool calc_unid, bool temp, bool items)
rp += player_equip( EQ_BODY_ARMOUR, ARM_SWAMP_DRAGON_ARMOUR );
// randart weapons:
- rp += scan_randarts(RAP_POISON, calc_unid);
+ rp += scan_artefacts(ARTP_POISON, calc_unid);
}
// mutations:
@@ -1865,7 +1865,7 @@ int player_prot_life(bool calc_unid, bool temp, bool items)
pl += player_equip_ego_type(EQ_ALL_ARMOUR, SPARM_POSITIVE_ENERGY);
// randart wpns
- pl += scan_randarts(RAP_NEGATIVE_ENERGY, calc_unid);
+ pl += scan_artefacts(ARTP_NEGATIVE_ENERGY, calc_unid);
}
// undead/demonic power
@@ -2063,7 +2063,7 @@ int player_AC(void)
if (player_equip_ego_type( EQ_SHIELD, SPARM_PROTECTION ))
AC += 300;
- AC += scan_randarts(RAP_AC) * 100;
+ AC += scan_artefacts(ARTP_AC) * 100;
if (you.duration[DUR_ICY_ARMOUR])
AC += 400 + 100 * you.skills[SK_ICE_MAGIC] / 3; // max 13
@@ -2364,7 +2364,7 @@ int player_evasion()
ev -= 2;
ev += player_equip( EQ_RINGS_PLUS, RING_EVASION );
- ev += scan_randarts( RAP_EVASION );
+ ev += scan_artefacts( ARTP_EVASION );
if (player_equip_ego_type( EQ_BODY_ARMOUR, SPARM_PONDEROUSNESS ))
ev -= 2;
@@ -2506,7 +2506,7 @@ int old_player_evasion(void)
break;
}
- ev += scan_randarts(RAP_EVASION);
+ ev += scan_artefacts(ARTP_EVASION);
return (ev);
}
@@ -2518,7 +2518,7 @@ int player_magical_power(void)
ret += 13 * player_equip(EQ_STAFF, STAFF_POWER);
ret += 9 * player_equip(EQ_RINGS, RING_MAGICAL_POWER);
- ret += scan_randarts(RAP_MAGICAL_POWER);
+ ret += scan_artefacts(ARTP_MAGICAL_POWER);
return (ret);
}
@@ -2597,7 +2597,7 @@ int player_see_invis(bool calc_unid)
si++;
// randart wpns
- int artefacts = scan_randarts(RAP_EYESIGHT, calc_unid);
+ int artefacts = scan_artefacts(ARTP_EYESIGHT, calc_unid);
if (artefacts > 0)
si += artefacts;
@@ -3641,7 +3641,7 @@ int check_stealth(void)
if ( you.duration[DUR_STEALTH] )
stealth += 80;
- stealth += scan_randarts( RAP_STEALTH );
+ stealth += scan_artefacts( ARTP_STEALTH );
if (player_is_airborne())
stealth += 10;
@@ -4503,12 +4503,12 @@ int slaying_bonus(char which_affected)
if (which_affected == PWPN_HIT)
{
ret += player_equip( EQ_RINGS_PLUS, RING_SLAYING );
- ret += scan_randarts(RAP_ACCURACY);
+ ret += scan_artefacts(ARTP_ACCURACY);
}
else if (which_affected == PWPN_DAMAGE)
{
ret += player_equip( EQ_RINGS_PLUS2, RING_SLAYING );
- ret += scan_randarts(RAP_DAMAGE);
+ ret += scan_artefacts(ARTP_DAMAGE);
}
ret += std::min(you.duration[DUR_SLAYING] / 13, 6);
@@ -4518,7 +4518,7 @@ int slaying_bonus(char which_affected)
// Checks each equip slot for an evokable item (jewellery or randart).
// Returns true if any of these has the same ability as the one handed in.
-bool items_give_ability(const int slot, randart_prop_type abil)
+bool items_give_ability(const int slot, artefact_prop_type abil)
{
for (int i = EQ_WEAPON; i < NUM_EQUIP; i++)
{
@@ -4537,16 +4537,16 @@ bool items_give_ability(const int slot, randart_prop_type abil)
if (eq == EQ_LEFT_RING || eq == EQ_RIGHT_RING)
{
- if (abil == RAP_LEVITATE && you.inv[eq].sub_type == RING_LEVITATION)
+ if (abil == ARTP_LEVITATE && you.inv[eq].sub_type == RING_LEVITATION)
return (true);
- if (abil == RAP_CAN_TELEPORT && you.inv[eq].sub_type == RING_TELEPORTATION)
+ if (abil == ARTP_CAN_TELEPORT && you.inv[eq].sub_type == RING_TELEPORTATION)
return (true);
- if (abil == RAP_INVISIBLE && you.inv[eq].sub_type == RING_INVISIBILITY)
+ if (abil == ARTP_INVISIBLE && you.inv[eq].sub_type == RING_INVISIBILITY)
return (true);
}
else if (eq == EQ_AMULET)
{
- if (abil == RAP_BERSERK && you.inv[eq].sub_type == AMU_RAGE)
+ if (abil == ARTP_BERSERK && you.inv[eq].sub_type == AMU_RAGE)
return (true);
}
@@ -4554,7 +4554,7 @@ bool items_give_ability(const int slot, randart_prop_type abil)
if (!is_random_artefact( you.inv[ eq ] ))
continue;
- if (randart_wpn_property(you.inv[ eq ], abil))
+ if (artefact_wpn_property(you.inv[ eq ], abil))
return (true);
}
@@ -4565,7 +4565,7 @@ bool items_give_ability(const int slot, randart_prop_type abil)
// Checks each equip slot for a randart, and adds up all of those with
// a given property. Slow if any randarts are worn, so avoid where
// possible.
-int scan_randarts(randart_prop_type which_property, bool calc_unid)
+int scan_artefacts(artefact_prop_type which_property, bool calc_unid)
{
int retval = 0;
@@ -4590,7 +4590,7 @@ int scan_randarts(randart_prop_type which_property, bool calc_unid)
continue;
}
- retval += randart_wpn_property( you.inv[ eq ], which_property );
+ retval += artefact_wpn_property( you.inv[ eq ], which_property );
}
return (retval);
@@ -5598,7 +5598,7 @@ static int _strength_modifier()
result += player_equip(EQ_RINGS_PLUS, RING_STRENGTH);
// randarts of strength
- result += scan_randarts(RAP_STRENGTH);
+ result += scan_artefacts(ARTP_STRENGTH);
// mutations
result += player_mutation_level(MUT_STRONG)
@@ -5633,7 +5633,7 @@ static int _int_modifier()
result += player_equip(EQ_RINGS_PLUS, RING_INTELLIGENCE);
// randarts of intelligence
- result += scan_randarts(RAP_INTELLIGENCE);
+ result += scan_artefacts(ARTP_INTELLIGENCE);
// mutations
result += player_mutation_level(MUT_CLEVER)
@@ -5656,7 +5656,7 @@ static int _dex_modifier()
result += player_equip(EQ_RINGS_PLUS, RING_DEXTERITY);
// randarts of dexterity
- result += scan_randarts(RAP_DEXTERITY);
+ result += scan_artefacts(ARTP_DEXTERITY);
// mutations
result += player_mutation_level(MUT_AGILE)
@@ -6488,7 +6488,7 @@ bool player::cannot_fight() const
return (false);
}
-// If you have a randart equipped that has the RAP_ANGRY property,
+// If you have a randart equipped that has the ARTP_ANGRY property,
// there's a 1/20 chance of it becoming activated whenever you
// attack a monster. (Same as the berserk mutation at level 1.)
// The probabilities for actually going berserk are cumulative!
@@ -6503,7 +6503,7 @@ static bool _equipment_make_berserk()
if (!is_random_artefact(*item))
continue;
- if (randart_wpn_property(*item, RAP_ANGRY) && one_chance_in(20))
+ if (artefact_wpn_property(*item, ARTP_ANGRY) && one_chance_in(20))
return (true);
}
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 1cdf5ecd14..6d83dfe8be 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -263,8 +263,8 @@ int player_teleport(bool calc_unid = true);
/* ***********************************************************************
* called from: ability - acr - items - misc - spells1 - spells3
* *********************************************************************** */
-bool items_give_ability(const int slot, randart_prop_type abil);
-int scan_randarts(randart_prop_type which_property, bool calc_unid = true);
+bool items_give_ability(const int slot, artefact_prop_type abil);
+int scan_artefacts(artefact_prop_type which_property, bool calc_unid = true);
/* ***********************************************************************
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index fc5007140b..4f9906f05b 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -30,10 +30,10 @@ REVISION("$Rev$");
#include "spl-book.h"
#include "stuff.h"
-#define KNOWN_PROPS_KEY "randart_known_props"
-#define RANDART_PROPS_KEY "randart_props"
-#define RANDART_NAME_KEY "randart_name"
-#define RANDART_APPEAR_KEY "randart_appearance"
+#define KNOWN_PROPS_KEY "artefact_known_props"
+#define ARTEFACT_PROPS_KEY "artefact_props"
+#define ARTEFACT_NAME_KEY "artefact_name"
+#define ARTEFACT_APPEAR_KEY "artefact_appearance"
static const char* _get_fixedart_name(const item_def &item);
@@ -117,7 +117,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
else if (is_good_god(which_god)
&& (brand == SPWPN_DRAINING || brand == SPWPN_PAIN
|| brand == SPWPN_VAMPIRICISM
- || randart_wpn_property(item, RAP_CURSED) != 0))
+ || artefact_wpn_property(item, ARTP_CURSED) != 0))
{
return (false);
}
@@ -132,8 +132,8 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
case GOD_ELYVILON:
// Peaceful healer god: no berserking.
- if (randart_wpn_property(item, RAP_ANGRY)
- || randart_wpn_property(item, RAP_BERSERK))
+ if (artefact_wpn_property(item, ARTP_ANGRY)
+ || artefact_wpn_property(item, ARTP_BERSERK))
{
return (false);
}
@@ -141,7 +141,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
case GOD_ZIN:
// Lawful god: no mutagenics.
- if (randart_wpn_property(item, RAP_MUTAGENIC))
+ if (artefact_wpn_property(item, ARTP_MUTAGENIC))
return (false);
break;
@@ -150,8 +150,8 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
if (item.base_type == OBJ_WEAPONS && brand != SPWPN_HOLY_WRATH)
return (false);
- if (randart_wpn_property(item, RAP_INVISIBLE)
- || randart_wpn_property(item, RAP_STEALTH) > 0)
+ if (artefact_wpn_property(item, ARTP_INVISIBLE)
+ || artefact_wpn_property(item, ARTP_STEALTH) > 0)
{
return (false);
}
@@ -167,7 +167,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
case GOD_KIKUBAAQUDGHA:
case GOD_VEHUMET:
// The magic gods: no preventing spellcasting.
- if (randart_wpn_property(item, RAP_PREVENT_SPELLCASTING))
+ if (artefact_wpn_property(item, ARTP_PREVENT_SPELLCASTING))
return (false);
break;
@@ -176,7 +176,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
if (brand == SPWPN_PAIN) // Pain involves necromantic spell use.
return (false);
- if (randart_wpn_property(item, RAP_MAGICAL_POWER))
+ if (artefact_wpn_property(item, ARTP_MAGICAL_POWER))
return (false);
default:
@@ -400,16 +400,16 @@ static long _calc_seed( const item_def &item )
return (item.special & RANDART_SEED_MASK);
}
-void randart_desc_properties( const item_def &item,
- randart_properties_t &proprt,
- randart_known_props_t &known,
+void artefact_desc_properties( const item_def &item,
+ artefact_properties_t &proprt,
+ artefact_known_props_t &known,
bool force_fake_props)
{
// Randart books have no randart properties.
if (item.base_type == OBJ_BOOKS)
return;
- randart_wpn_properties( item, proprt, known);
+ artefact_wpn_properties( item, proprt, known);
if (!force_fake_props && item_ident( item, ISFLAG_KNOW_PROPERTIES ))
return;
@@ -418,7 +418,7 @@ void randart_desc_properties( const item_def &item,
if (item.base_type != OBJ_JEWELLERY)
return;
- randart_prop_type fake_rap = RAP_NUM_PROPERTIES;
+ artefact_prop_type fake_rap = ARTP_NUM_PROPERTIES;
int fake_plus = 1;
// The base jewellery type is one whose property is revealed by
@@ -429,28 +429,28 @@ void randart_desc_properties( const item_def &item,
switch (item.sub_type)
{
case RING_INVISIBILITY:
- fake_rap = RAP_INVISIBLE;
+ fake_rap = ARTP_INVISIBLE;
break;
case RING_TELEPORTATION:
- fake_rap = RAP_CAUSE_TELEPORTATION;
+ fake_rap = ARTP_CAUSE_TELEPORTATION;
break;
case RING_MAGICAL_POWER:
- fake_rap = RAP_MAGICAL_POWER;
+ fake_rap = ARTP_MAGICAL_POWER;
fake_plus = 9;
break;
case RING_LEVITATION:
- fake_rap = RAP_LEVITATE;
+ fake_rap = ARTP_LEVITATE;
break;
case AMU_RAGE:
- fake_rap = RAP_BERSERK;
+ fake_rap = ARTP_BERSERK;
break;
}
- if (fake_rap != RAP_NUM_PROPERTIES)
+ if (fake_rap != ARTP_NUM_PROPERTIES)
{
proprt[fake_rap] += fake_plus;
@@ -470,108 +470,108 @@ void randart_desc_properties( const item_def &item,
// much info about the base type as possible into the randarts
// property struct.
- randart_prop_type fake_rap2 = RAP_NUM_PROPERTIES;
+ artefact_prop_type fake_rap2 = ARTP_NUM_PROPERTIES;
int fake_plus2 = 1;
switch (item.sub_type)
{
case RING_PROTECTION:
- fake_rap = RAP_AC;
+ fake_rap = ARTP_AC;
fake_plus = item.plus;
break;
case RING_PROTECTION_FROM_FIRE:
- fake_rap = RAP_FIRE;
+ fake_rap = ARTP_FIRE;
break;
case RING_POISON_RESISTANCE:
- fake_rap = RAP_POISON;
+ fake_rap = ARTP_POISON;
break;
case RING_PROTECTION_FROM_COLD:
- fake_rap = RAP_COLD;
+ fake_rap = ARTP_COLD;
break;
case RING_SLAYING:
- fake_rap = RAP_ACCURACY;
+ fake_rap = ARTP_ACCURACY;
fake_plus = item.plus;
- fake_rap2 = RAP_DAMAGE;
+ fake_rap2 = ARTP_DAMAGE;
fake_plus2 = item.plus2;
break;
case RING_SEE_INVISIBLE:
- fake_rap = RAP_EYESIGHT;
+ fake_rap = ARTP_EYESIGHT;
break;
case RING_HUNGER:
- fake_rap = RAP_METABOLISM;
+ fake_rap = ARTP_METABOLISM;
break;
case RING_EVASION:
- fake_rap = RAP_EVASION;
+ fake_rap = ARTP_EVASION;
fake_plus = item.plus;
break;
case RING_STRENGTH:
- fake_rap = RAP_STRENGTH;
+ fake_rap = ARTP_STRENGTH;
fake_plus = item.plus;
break;
case RING_INTELLIGENCE:
- fake_rap = RAP_INTELLIGENCE;
+ fake_rap = ARTP_INTELLIGENCE;
fake_plus = item.plus;
break;
case RING_DEXTERITY:
- fake_rap = RAP_DEXTERITY;
+ fake_rap = ARTP_DEXTERITY;
fake_plus = item.plus;
break;
case RING_LIFE_PROTECTION:
- fake_rap = RAP_NEGATIVE_ENERGY;
+ fake_rap = ARTP_NEGATIVE_ENERGY;
break;
case RING_PROTECTION_FROM_MAGIC:
- fake_rap = RAP_MAGIC;
+ fake_rap = ARTP_MAGIC;
break;
case RING_FIRE:
- fake_rap = RAP_FIRE;
- fake_rap2 = RAP_COLD;
+ fake_rap = ARTP_FIRE;
+ fake_rap2 = ARTP_COLD;
fake_plus2 = -1;
break;
case RING_ICE:
- fake_rap = RAP_COLD;
- fake_rap2 = RAP_FIRE;
+ fake_rap = ARTP_COLD;
+ fake_rap2 = ARTP_FIRE;
fake_plus2 = -1;
break;
case AMU_INACCURACY:
- fake_rap = RAP_ACCURACY;
+ fake_rap = ARTP_ACCURACY;
fake_plus = -5;
break;
}
- if (fake_rap != RAP_NUM_PROPERTIES && fake_plus != 0)
+ if (fake_rap != ARTP_NUM_PROPERTIES && fake_plus != 0)
proprt[fake_rap] += fake_plus;
- if (fake_rap2 != RAP_NUM_PROPERTIES && fake_plus2 != 0)
+ if (fake_rap2 != ARTP_NUM_PROPERTIES && fake_plus2 != 0)
proprt[fake_rap2] += fake_plus2;
if (item_ident( item, ISFLAG_KNOW_PROPERTIES )
|| item_ident( item, ISFLAG_KNOW_TYPE ))
{
- if (fake_rap != RAP_NUM_PROPERTIES && proprt[fake_rap] != 0)
+ if (fake_rap != ARTP_NUM_PROPERTIES && proprt[fake_rap] != 0)
known[fake_rap] = true;
- if (fake_rap2 != RAP_NUM_PROPERTIES && proprt[fake_rap2] != 0)
+ if (fake_rap2 != ARTP_NUM_PROPERTIES && proprt[fake_rap2] != 0)
known[fake_rap2] = true;
}
}
-inline static void _randart_propset( randart_properties_t &p,
- randart_prop_type pt,
+inline static void _randart_propset( artefact_properties_t &p,
+ artefact_prop_type pt,
int value,
bool neg )
{
@@ -581,7 +581,7 @@ inline static void _randart_propset( randart_properties_t &p,
}
static int _randart_add_one_property( const item_def &item,
- randart_properties_t &proprt )
+ artefact_properties_t &proprt )
{
// This function assumes that no properties have been added to this
// randart yet.
@@ -623,27 +623,27 @@ static int _randart_add_one_property( const item_def &item,
{
default:
case 0:
- _randart_propset(proprt, RAP_AC,
+ _randart_propset(proprt, ARTP_AC,
1 + random2(3) + random2(3) + random2(3),
negench);
break;
case 1:
- _randart_propset(proprt, RAP_EVASION,
+ _randart_propset(proprt, ARTP_EVASION,
1 + random2(3) + random2(3) + random2(3),
negench);
break;
case 2:
- _randart_propset(proprt, RAP_STRENGTH,
+ _randart_propset(proprt, ARTP_STRENGTH,
1 + random2(3) + random2(3),
negench);
break;
case 3:
- _randart_propset(proprt, RAP_INTELLIGENCE,
+ _randart_propset(proprt, ARTP_INTELLIGENCE,
1 + random2(3) + random2(3),
negench);
break;
case 4:
- _randart_propset(proprt, RAP_DEXTERITY,
+ _randart_propset(proprt, ARTP_DEXTERITY,
1 + random2(3) + random2(3),
negench);
break;
@@ -652,8 +652,8 @@ static int _randart_add_one_property( const item_def &item,
return (negench ? -1 : 1);
}
-void static _get_randart_properties(const item_def &item,
- randart_properties_t &proprt)
+void static _get_randart_properties(const item_def &item,
+ artefact_properties_t &proprt)
{
const object_class_type aclass = item.base_type;
const int atype = item.sub_type;
@@ -677,66 +677,66 @@ void static _get_randart_properties(const item_def &item,
if (aclass == OBJ_WEAPONS) // only weapons get brands, of course
{
- proprt[RAP_BRAND] = SPWPN_FLAMING + random2(15); // brand
+ proprt[ARTP_BRAND] = SPWPN_FLAMING + random2(15); // brand
if (one_chance_in(6))
- proprt[RAP_BRAND] = SPWPN_FLAMING + random2(2);
+ proprt[ARTP_BRAND] = SPWPN_FLAMING + random2(2);
if (one_chance_in(6))
- proprt[RAP_BRAND] = SPWPN_ORC_SLAYING + random2(5);
+ proprt[ARTP_BRAND] = SPWPN_ORC_SLAYING + random2(5);
- if (proprt[RAP_BRAND] == SPWPN_DRAGON_SLAYING
+ if (proprt[ARTP_BRAND] == SPWPN_DRAGON_SLAYING
&& weapon_skill(item) != SK_POLEARMS)
{
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
}
- if (proprt[RAP_BRAND] == SPWPN_VENOM
+ if (proprt[ARTP_BRAND] == SPWPN_VENOM
&& get_vorpal_type(item) == DVORP_CRUSHING)
{
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
}
if (one_chance_in(6))
- proprt[RAP_BRAND] = SPWPN_VORPAL;
+ proprt[ARTP_BRAND] = SPWPN_VORPAL;
- if (proprt[RAP_BRAND] == SPWPN_FLAME
- || proprt[RAP_BRAND] == SPWPN_FROST)
+ if (proprt[ARTP_BRAND] == SPWPN_FLAME
+ || proprt[ARTP_BRAND] == SPWPN_FROST)
{
- proprt[RAP_BRAND] = SPWPN_NORMAL; // missile wpns
+ proprt[ARTP_BRAND] = SPWPN_NORMAL; // missile wpns
}
- if (proprt[RAP_BRAND] == SPWPN_PROTECTION)
- proprt[RAP_BRAND] = SPWPN_NORMAL; // no protection
+ if (proprt[ARTP_BRAND] == SPWPN_PROTECTION)
+ proprt[ARTP_BRAND] = SPWPN_NORMAL; // no protection
// if this happens, things might get broken - bwr
- if (proprt[RAP_BRAND] == SPWPN_SPEED && atype == WPN_QUICK_BLADE)
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ if (proprt[ARTP_BRAND] == SPWPN_SPEED && atype == WPN_QUICK_BLADE)
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
if (is_range_weapon(item))
{
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
if (one_chance_in(3))
{
int tmp = random2(20);
- proprt[RAP_BRAND] = (tmp >= 18) ? SPWPN_SPEED :
+ proprt[ARTP_BRAND] = (tmp >= 18) ? SPWPN_SPEED :
(tmp >= 14) ? SPWPN_PROTECTION :
(tmp >= 10) ? SPWPN_VENOM
: SPWPN_VORPAL + random2(3);
if (atype == WPN_BLOWGUN
- && proprt[RAP_BRAND] != SPWPN_SPEED
- && proprt[RAP_BRAND] != SPWPN_PROTECTION)
+ && proprt[ARTP_BRAND] != SPWPN_SPEED
+ && proprt[ARTP_BRAND] != SPWPN_PROTECTION)
{
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
}
if (atype == WPN_SLING
- && proprt[RAP_BRAND] == SPWPN_VENOM)
+ && proprt[ARTP_BRAND] == SPWPN_VENOM)
{
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
}
}
}
@@ -746,25 +746,25 @@ void static _get_randart_properties(const item_def &item,
switch (random2(9))
{
case 0:
- proprt[RAP_BRAND] = SPWPN_DRAINING;
+ proprt[ARTP_BRAND] = SPWPN_DRAINING;
break;
case 1:
- proprt[RAP_BRAND] = SPWPN_FLAMING;
+ proprt[ARTP_BRAND] = SPWPN_FLAMING;
break;
case 2:
- proprt[RAP_BRAND] = SPWPN_FREEZING;
+ proprt[ARTP_BRAND] = SPWPN_FREEZING;
break;
case 3:
- proprt[RAP_BRAND] = SPWPN_ELECTROCUTION;
+ proprt[ARTP_BRAND] = SPWPN_ELECTROCUTION;
break;
case 4:
- proprt[RAP_BRAND] = SPWPN_VAMPIRICISM;
+ proprt[ARTP_BRAND] = SPWPN_VAMPIRICISM;
break;
case 5:
- proprt[RAP_BRAND] = SPWPN_PAIN;
+ proprt[ARTP_BRAND] = SPWPN_PAIN;
break;
case 6:
- proprt[RAP_BRAND] = SPWPN_VENOM;
+ proprt[ARTP_BRAND] = SPWPN_VENOM;
break;
default:
power_level -= 2;
@@ -772,7 +772,7 @@ void static _get_randart_properties(const item_def &item,
power_level += 2;
}
else if (one_chance_in(3))
- proprt[RAP_BRAND] = SPWPN_NORMAL;
+ proprt[ARTP_BRAND] = SPWPN_NORMAL;
else
power_level++;
}
@@ -784,11 +784,11 @@ void static _get_randart_properties(const item_def &item,
&& aclass != OBJ_ARMOUR
&& (aclass != OBJ_JEWELLERY || atype != RING_PROTECTION))
{
- proprt[RAP_AC] = 1 + random2(3) + random2(3) + random2(3);
+ proprt[ARTP_AC] = 1 + random2(3) + random2(3) + random2(3);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_AC] -= 1 + random2(3) + random2(3) + random2(3);
+ proprt[ARTP_AC] -= 1 + random2(3) + random2(3) + random2(3);
power_level--;
}
}
@@ -797,11 +797,11 @@ void static _get_randart_properties(const item_def &item,
if (one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_EVASION))
{
- proprt[RAP_EVASION] = 1 + random2(3) + random2(3) + random2(3);
+ proprt[ARTP_EVASION] = 1 + random2(3) + random2(3) + random2(3);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_EVASION] -= 1 + random2(3) + random2(3)
+ proprt[ARTP_EVASION] -= 1 + random2(3) + random2(3)
+ random2(3);
power_level--;
}
@@ -811,11 +811,11 @@ void static _get_randart_properties(const item_def &item,
if (one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_STRENGTH))
{
- proprt[RAP_STRENGTH] = 1 + random2(3) + random2(2);
+ proprt[ARTP_STRENGTH] = 1 + random2(3) + random2(2);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_STRENGTH] -= 1 + random2(3) + random2(3)
+ proprt[ARTP_STRENGTH] -= 1 + random2(3) + random2(3)
+ random2(3);
power_level--;
}
@@ -825,11 +825,11 @@ void static _get_randart_properties(const item_def &item,
if (one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_INTELLIGENCE))
{
- proprt[RAP_INTELLIGENCE] = 1 + random2(3) + random2(2);
+ proprt[ARTP_INTELLIGENCE] = 1 + random2(3) + random2(2);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_INTELLIGENCE] -= 1 + random2(3) + random2(3)
+ proprt[ARTP_INTELLIGENCE] -= 1 + random2(3) + random2(3)
+ random2(3);
power_level--;
}
@@ -839,11 +839,11 @@ void static _get_randart_properties(const item_def &item,
if (one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_DEXTERITY))
{
- proprt[RAP_DEXTERITY] = 1 + random2(3) + random2(2);
+ proprt[ARTP_DEXTERITY] = 1 + random2(3) + random2(2);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_DEXTERITY] -= 1 + random2(3) + random2(3)
+ proprt[ARTP_DEXTERITY] -= 1 + random2(3) + random2(3)
+ random2(3);
power_level--;
}
@@ -856,11 +856,11 @@ void static _get_randart_properties(const item_def &item,
// Weapons and rings of slaying can't get these.
if (one_chance_in(4 + power_level)) // to-hit
{
- proprt[RAP_ACCURACY] = 1 + random2(3) + random2(2);
+ proprt[ARTP_ACCURACY] = 1 + random2(3) + random2(2);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_ACCURACY] -= 1 + random2(3) + random2(3)
+ proprt[ARTP_ACCURACY] -= 1 + random2(3) + random2(3)
+ random2(3);
power_level--;
}
@@ -868,11 +868,11 @@ void static _get_randart_properties(const item_def &item,
if (one_chance_in(4 + power_level)) // to-dam
{
- proprt[RAP_DAMAGE] = 1 + random2(3) + random2(2);
+ proprt[ARTP_DAMAGE] = 1 + random2(3) + random2(2);
power_level++;
if (one_chance_in(4))
{
- proprt[RAP_DAMAGE] -= 1 + random2(3) + random2(3) + random2(3);
+ proprt[ARTP_DAMAGE] -= 1 + random2(3) + random2(3) + random2(3);
power_level--;
}
}
@@ -898,9 +898,9 @@ void static _get_randart_properties(const item_def &item,
&& atype != ARM_ICE_DRAGON_ARMOUR
&& atype != ARM_GOLD_DRAGON_ARMOUR)))
{
- proprt[RAP_FIRE] = 1;
+ proprt[ARTP_FIRE] = 1;
if (one_chance_in(5))
- proprt[RAP_FIRE]++;
+ proprt[ARTP_FIRE]++;
power_level++;
}
@@ -916,9 +916,9 @@ void static _get_randart_properties(const item_def &item,
&& atype != ARM_ICE_DRAGON_ARMOUR
&& atype != ARM_GOLD_DRAGON_ARMOUR))
{
- proprt[RAP_COLD] = 1;
+ proprt[ARTP_COLD] = 1;
if (one_chance_in(5))
- proprt[RAP_COLD]++;
+ proprt[ARTP_COLD]++;
power_level++;
}
@@ -930,7 +930,7 @@ void static _get_randart_properties(const item_def &item,
&& one_chance_in(4 + power_level)
&& (aclass != OBJ_ARMOUR || atype != ARM_STORM_DRAGON_ARMOUR))
{
- proprt[RAP_ELECTRICITY] = 1;
+ proprt[ARTP_ELECTRICITY] = 1;
power_level++;
}
@@ -943,7 +943,7 @@ void static _get_randart_properties(const item_def &item,
&& atype != ARM_SWAMP_DRAGON_ARMOUR
&& atype != ARM_NAGA_BARDING))
{
- proprt[RAP_POISON] = 1;
+ proprt[ARTP_POISON] = 1;
power_level++;
}
@@ -951,11 +951,11 @@ void static _get_randart_properties(const item_def &item,
if (!done_powers
&& one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_LIFE_PROTECTION)
- && proprt[RAP_BRAND] != SPWPN_DRAINING
- && proprt[RAP_BRAND] != SPWPN_VAMPIRICISM
- && proprt[RAP_BRAND] != SPWPN_PAIN)
+ && proprt[ARTP_BRAND] != SPWPN_DRAINING
+ && proprt[ARTP_BRAND] != SPWPN_VAMPIRICISM
+ && proprt[ARTP_BRAND] != SPWPN_PAIN)
{
- proprt[RAP_NEGATIVE_ENERGY] = 1;
+ proprt[ARTP_NEGATIVE_ENERGY] = 1;
power_level++;
}
@@ -964,7 +964,7 @@ void static _get_randart_properties(const item_def &item,
&& one_chance_in(4 + power_level)
&& (aclass != OBJ_JEWELLERY || atype != RING_PROTECTION_FROM_MAGIC))
{
- proprt[RAP_MAGIC] = 35 + random2(65);
+ proprt[ARTP_MAGIC] = 35 + random2(65);
power_level++;
}
@@ -974,7 +974,7 @@ void static _get_randart_properties(const item_def &item,
&& (aclass != OBJ_JEWELLERY || atype != RING_INVISIBILITY)
&& (aclass != OBJ_ARMOUR || atype != ARM_NAGA_BARDING))
{
- proprt[RAP_EYESIGHT] = 1;
+ proprt[ARTP_EYESIGHT] = 1;
power_level++;
}
@@ -986,7 +986,7 @@ void static _get_randart_properties(const item_def &item,
&& one_chance_in(10)
&& (aclass != OBJ_JEWELLERY || atype != RING_INVISIBILITY))
{
- proprt[RAP_INVISIBLE] = 1;
+ proprt[ARTP_INVISIBLE] = 1;
power_level++;
}
@@ -995,14 +995,14 @@ void static _get_randart_properties(const item_def &item,
&& one_chance_in(10)
&& (aclass != OBJ_JEWELLERY || atype != RING_LEVITATION))
{
- proprt[RAP_LEVITATE] = 1;
+ proprt[ARTP_LEVITATE] = 1;
power_level++;
}
// blink
if (!done_powers && one_chance_in(10))
{
- proprt[RAP_BLINK] = 1;
+ proprt[ARTP_BLINK] = 1;
power_level++;
}
@@ -1011,7 +1011,7 @@ void static _get_randart_properties(const item_def &item,
&& one_chance_in(10)
&& (aclass != OBJ_JEWELLERY || atype != RING_TELEPORTATION))
{
- proprt[RAP_CAN_TELEPORT] = 1;
+ proprt[ARTP_CAN_TELEPORT] = 1;
power_level++;
}
@@ -1021,14 +1021,14 @@ void static _get_randart_properties(const item_def &item,
&& (aclass != OBJ_WEAPONS || !is_range_weapon(item))
&& (aclass != OBJ_JEWELLERY || atype != AMU_RAGE))
{
- proprt[RAP_BERSERK] = 1;
+ proprt[ARTP_BERSERK] = 1;
power_level++;
}
// sense surroundings
if (!done_powers && one_chance_in(10))
{
- proprt[RAP_MAPPING] = 1;
+ proprt[ARTP_MAPPING] = 1;
power_level++;
}
@@ -1044,15 +1044,15 @@ void static _get_randart_properties(const item_def &item,
case 0: // makes noise
if (aclass != OBJ_WEAPONS)
break;
- proprt[RAP_NOISES] = 1 + random2(4);
+ proprt[ARTP_NOISES] = 1 + random2(4);
break;
case 1: // no magic
- proprt[RAP_PREVENT_SPELLCASTING] = 1;
+ proprt[ARTP_PREVENT_SPELLCASTING] = 1;
break;
case 2: // random teleport
if (aclass != OBJ_WEAPONS)
break;
- proprt[RAP_CAUSE_TELEPORTATION] = 5 + random2(15);
+ proprt[ARTP_CAUSE_TELEPORTATION] = 5 + random2(15);
break;
case 3: // no teleport - doesn't affect some instantaneous
// teleports
@@ -1060,14 +1060,14 @@ void static _get_randart_properties(const item_def &item,
break; // already is a ring of tport
if (aclass == OBJ_JEWELLERY && atype == RING_TELEPORT_CONTROL)
break; // already is a ring of tport ctrl
- proprt[RAP_BLINK] = 0;
- proprt[RAP_CAN_TELEPORT] = 0;
- proprt[RAP_PREVENT_TELEPORTATION] = 1;
+ proprt[ARTP_BLINK] = 0;
+ proprt[ARTP_CAN_TELEPORT] = 0;
+ proprt[ARTP_PREVENT_TELEPORTATION] = 1;
break;
case 4: // berserk on attack
if (aclass != OBJ_WEAPONS || is_range_weapon(item))
break;
- proprt[RAP_ANGRY] = 1 + random2(8);
+ proprt[ARTP_ANGRY] = 1 + random2(8);
break;
case 5: // susceptible to fire
if (aclass == OBJ_JEWELLERY
@@ -1082,7 +1082,7 @@ void static _get_randart_properties(const item_def &item,
{
break;
}
- proprt[RAP_FIRE] = -1;
+ proprt[ARTP_FIRE] = -1;
break;
case 6: // susceptible to cold
if (aclass == OBJ_JEWELLERY
@@ -1097,20 +1097,20 @@ void static _get_randart_properties(const item_def &item,
{
break;
}
- proprt[RAP_COLD] = -1;
+ proprt[ARTP_COLD] = -1;
break;
case 7: // speed metabolism
if (aclass == OBJ_JEWELLERY && atype == RING_HUNGER)
break; // already is a ring of hunger
if (aclass == OBJ_JEWELLERY && atype == RING_SUSTENANCE)
break; // already is a ring of sustenance
- proprt[RAP_METABOLISM] = 1 + random2(3);
+ proprt[ARTP_METABOLISM] = 1 + random2(3);
break;
case 8:
// emits mutagenic radiation - increases
// magic_contamination. property is chance (1 in ...) of
// increasing magic_contamination
- proprt[RAP_MUTAGENIC] = 2 + random2(4);
+ proprt[ARTP_MUTAGENIC] = 2 + random2(4);
break;
}
}
@@ -1125,24 +1125,24 @@ void static _get_randart_properties(const item_def &item,
&& get_armour_ego_type(item) != SPARM_STEALTH)
{
power_level++;
- proprt[RAP_STEALTH] = 10 + random2(70);
+ proprt[ARTP_STEALTH] = 10 + random2(70);
if (one_chance_in(4))
{
- proprt[RAP_STEALTH] = -proprt[RAP_STEALTH] - random2(20);
+ proprt[ARTP_STEALTH] = -proprt[ARTP_STEALTH] - random2(20);
power_level--;
}
}
- if (randart_wpn_num_props(proprt) == 0)
+ if (artefact_wpn_num_props(proprt) == 0)
power_level += _randart_add_one_property(item, proprt);
if ((power_level < 2 && one_chance_in(5)) || one_chance_in(30))
{
if (one_chance_in(4))
- proprt[RAP_CURSED] = 1 + random2(5);
+ proprt[ARTP_CURSED] = 1 + random2(5);
else
- proprt[RAP_CURSED] = -1;
+ proprt[ARTP_CURSED] = -1;
}
}
@@ -1212,10 +1212,10 @@ static bool _init_randart_properties(item_def &item)
{
ASSERT( is_random_artefact( item ) );
CrawlHashTable &props = item.props;
- if (!props.exists( RANDART_PROPS_KEY ))
- props[RANDART_PROPS_KEY].new_vector(SV_SHORT).resize(RA_PROPERTIES);
+ if (!props.exists( ARTEFACT_PROPS_KEY ))
+ props[ARTEFACT_PROPS_KEY].new_vector(SV_SHORT).resize(RA_PROPERTIES);
- CrawlVector &rap = props[RANDART_PROPS_KEY];
+ CrawlVector &rap = props[ARTEFACT_PROPS_KEY];
rap.set_max_size(RA_PROPERTIES);
for (vec_size i = 0; i < RA_PROPERTIES; i++)
@@ -1234,12 +1234,12 @@ static bool _init_randart_properties(item_def &item)
if (item.base_type == OBJ_BOOKS)
return _init_randart_book(item);
- randart_properties_t prop;
+ artefact_properties_t prop;
_get_randart_properties(item, prop);
for (int i = 0; i < RA_PROPERTIES; i++)
{
- if (i == RAP_CURSED && prop[i] < 0)
+ if (i == ARTP_CURSED && prop[i] < 0)
{
do_curse_item(item);
continue;
@@ -1250,9 +1250,9 @@ static bool _init_randart_properties(item_def &item)
return (true);
}
-void randart_wpn_properties( const item_def &item,
- randart_properties_t &proprt,
- randart_known_props_t &known)
+void artefact_wpn_properties( const item_def &item,
+ artefact_properties_t &proprt,
+ artefact_known_props_t &known)
{
ASSERT( is_random_artefact( item ) );
ASSERT( item.props.exists( KNOWN_PROPS_KEY ) );
@@ -1275,9 +1275,9 @@ void randart_wpn_properties( const item_def &item,
known[i] = known_vec[i];
}
- if (item.props.exists( RANDART_PROPS_KEY ))
+ if (item.props.exists( ARTEFACT_PROPS_KEY ))
{
- const CrawlVector &rap_vec = item.props[RANDART_PROPS_KEY].get_vector();
+ const CrawlVector &rap_vec = item.props[ARTEFACT_PROPS_KEY].get_vector();
ASSERT( rap_vec.get_type() == SV_SHORT );
ASSERT( rap_vec.size() == RA_PROPERTIES);
ASSERT( rap_vec.get_max_size() == RA_PROPERTIES);
@@ -1299,40 +1299,41 @@ void randart_wpn_properties( const item_def &item,
}
-void randart_wpn_properties( const item_def &item,
- randart_properties_t &proprt )
+void artefact_wpn_properties( const item_def &item,
+ artefact_properties_t &proprt )
{
- randart_known_props_t known;
+ artefact_known_props_t known;
- randart_wpn_properties(item, proprt, known);
+ artefact_wpn_properties(item, proprt, known);
}
-int randart_wpn_property( const item_def &item, randart_prop_type prop,
- bool &_known )
+int artefact_wpn_property( const item_def &item, artefact_prop_type prop,
+ bool &_known )
{
- randart_properties_t proprt;
- randart_known_props_t known;
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
- randart_wpn_properties( item, proprt, known );
+ artefact_wpn_properties( item, proprt, known );
_known = known[prop];
return ( proprt[prop] );
}
-int randart_wpn_property( const item_def &item, randart_prop_type prop )
+int artefact_wpn_property( const item_def &item, artefact_prop_type prop )
{
bool known;
- return randart_wpn_property( item, prop, known );
+ return artefact_wpn_property( item, prop, known );
}
-int randart_known_wpn_property( const item_def &item, randart_prop_type prop )
+int artefact_known_wpn_property( const item_def &item,
+ artefact_prop_type prop )
{
- randart_properties_t proprt;
- randart_known_props_t known;
+ artefact_properties_t proprt;
+ artefact_known_props_t known;
- randart_wpn_properties( item, proprt, known );
+ artefact_wpn_properties( item, proprt, known );
if (known[prop])
return ( proprt[prop] );
@@ -1340,26 +1341,26 @@ int randart_known_wpn_property( const item_def &item, randart_prop_type prop )
return (0);
}
-int randart_wpn_num_props( const item_def &item )
+int artefact_wpn_num_props( const item_def &item )
{
- randart_properties_t proprt;
- randart_wpn_properties( item, proprt );
+ artefact_properties_t proprt;
+ artefact_wpn_properties( item, proprt );
- return randart_wpn_num_props( proprt );
+ return artefact_wpn_num_props( proprt );
}
-int randart_wpn_num_props( const randart_properties_t &proprt )
+int artefact_wpn_num_props( const artefact_properties_t &proprt )
{
int num = 0;
- for (int i = 0; i < RAP_NUM_PROPERTIES; i++)
+ for (int i = 0; i < ARTP_NUM_PROPERTIES; i++)
if (proprt[i] != 0)
num++;
return num;
}
-void randart_wpn_learn_prop( item_def &item, randart_prop_type prop )
+void artefact_wpn_learn_prop( item_def &item, artefact_prop_type prop )
{
ASSERT( is_random_artefact( item ) );
ASSERT( item.props.exists( KNOWN_PROPS_KEY ) );
@@ -1374,14 +1375,14 @@ void randart_wpn_learn_prop( item_def &item, randart_prop_type prop )
return;
known_vec[prop] = (bool) true;
- if (Options.autoinscribe_randarts)
- add_autoinscription( item, randart_auto_inscription(item));
+ if (Options.autoinscribe_artefacts)
+ add_autoinscription( item, artefact_auto_inscription(item));
}
-bool randart_wpn_known_prop( const item_def &item, randart_prop_type prop )
+bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop )
{
bool known;
- randart_wpn_property( item, prop, known );
+ artefact_wpn_property( item, prop, known );
return known;
}
@@ -1551,28 +1552,28 @@ std::string get_artefact_name( const item_def &item )
if (item_type_known(item))
{
// print artefact's real name
- if (item.props.exists(RANDART_NAME_KEY))
- return item.props[RANDART_NAME_KEY].get_string();
+ if (item.props.exists(ARTEFACT_NAME_KEY))
+ return item.props[ARTEFACT_NAME_KEY].get_string();
return artefact_name(item, false);
}
// print artefact appearance
- if (item.props.exists(RANDART_APPEAR_KEY))
- return item.props[RANDART_APPEAR_KEY].get_string();
+ if (item.props.exists(ARTEFACT_APPEAR_KEY))
+ return item.props[ARTEFACT_APPEAR_KEY].get_string();
return artefact_name(item, false);
}
-void set_randart_name( item_def &item, const std::string &name )
+void set_artefact_name( item_def &item, const std::string &name )
{
ASSERT( is_random_artefact( item ));
ASSERT( !name.empty() );
- item.props[RANDART_NAME_KEY].get_string() = name;
+ item.props[ARTEFACT_NAME_KEY].get_string() = name;
}
-void set_randart_appearance( item_def &item, const std::string &appear )
+void set_artefact_appearance( item_def &item, const std::string &appear )
{
ASSERT( is_random_artefact( item ));
ASSERT( !appear.empty() );
- item.props[RANDART_APPEAR_KEY].get_string() = appear;
+ item.props[ARTEFACT_APPEAR_KEY].get_string() = appear;
}
int find_unrandart_index(const item_def& artefact)
@@ -1892,12 +1893,12 @@ bool make_item_fixed_artefact( item_def &item, bool in_abyss, int which )
item.quantity = 1;
// get true artefact name
- ASSERT(!item.props.exists( RANDART_NAME_KEY ));
- item.props[RANDART_NAME_KEY].get_string() = fixedart->name;
+ ASSERT(!item.props.exists( ARTEFACT_NAME_KEY ));
+ item.props[ARTEFACT_NAME_KEY].get_string() = fixedart->name;
// get artefact appearance
- ASSERT(!item.props.exists( RANDART_APPEAR_KEY ));
- item.props[RANDART_APPEAR_KEY].get_string() = fixedart->appearance;
+ ASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY ));
+ item.props[ARTEFACT_APPEAR_KEY].get_string() = fixedart->appearance;
if (fixedart->curse)
do_curse_item(item);
@@ -1910,104 +1911,104 @@ bool make_item_fixed_artefact( item_def &item, bool in_abyss, int which )
}
static bool _randart_is_redundant( const item_def &item,
- randart_properties_t &proprt )
+ artefact_properties_t &proprt )
{
if (item.base_type != OBJ_JEWELLERY)
return (false);
- randart_prop_type provides = RAP_NUM_PROPERTIES;
- randart_prop_type provides2 = RAP_NUM_PROPERTIES;
+ artefact_prop_type provides = ARTP_NUM_PROPERTIES;
+ artefact_prop_type provides2 = ARTP_NUM_PROPERTIES;
switch (item.sub_type)
{
case RING_PROTECTION:
- provides = RAP_AC;
+ provides = ARTP_AC;
break;
case RING_FIRE:
case RING_PROTECTION_FROM_FIRE:
- provides = RAP_FIRE;
+ provides = ARTP_FIRE;
break;
case RING_POISON_RESISTANCE:
- provides = RAP_POISON;
+ provides = ARTP_POISON;
break;
case RING_ICE:
case RING_PROTECTION_FROM_COLD:
- provides = RAP_COLD;
+ provides = ARTP_COLD;
break;
case RING_STRENGTH:
- provides = RAP_STRENGTH;
+ provides = ARTP_STRENGTH;
break;
case RING_SLAYING:
- provides = RAP_DAMAGE;
- provides2 = RAP_ACCURACY;
+ provides = ARTP_DAMAGE;
+ provides2 = ARTP_ACCURACY;
break;
case RING_SEE_INVISIBLE:
- provides = RAP_EYESIGHT;
+ provides = ARTP_EYESIGHT;
break;
case RING_INVISIBILITY:
- provides = RAP_INVISIBLE;
+ provides = ARTP_INVISIBLE;
break;
case RING_HUNGER:
- provides = RAP_METABOLISM;
+ provides = ARTP_METABOLISM;
break;
case RING_TELEPORTATION:
- provides = RAP_CAN_TELEPORT;
- provides2 = RAP_CAUSE_TELEPORTATION;
+ provides = ARTP_CAN_TELEPORT;
+ provides2 = ARTP_CAUSE_TELEPORTATION;
break;
case RING_EVASION:
- provides = RAP_EVASION;
+ provides = ARTP_EVASION;
break;
case RING_DEXTERITY:
- provides = RAP_DEXTERITY;
+ provides = ARTP_DEXTERITY;
break;
case RING_INTELLIGENCE:
- provides = RAP_INTELLIGENCE;
+ provides = ARTP_INTELLIGENCE;
break;
case RING_MAGICAL_POWER:
- provides = RAP_MAGICAL_POWER;
+ provides = ARTP_MAGICAL_POWER;
break;
case RING_LEVITATION:
- provides = RAP_LEVITATE;
+ provides = ARTP_LEVITATE;
break;
case RING_LIFE_PROTECTION:
- provides = RAP_AC;
+ provides = ARTP_AC;
break;
case RING_PROTECTION_FROM_MAGIC:
- provides = RAP_MAGIC;
+ provides = ARTP_MAGIC;
break;
case AMU_RAGE:
- provides = RAP_BERSERK;
+ provides = ARTP_BERSERK;
break;
case AMU_INACCURACY:
- provides = RAP_ACCURACY;
+ provides = ARTP_ACCURACY;
break;
}
- if (provides == RAP_NUM_PROPERTIES)
+ if (provides == ARTP_NUM_PROPERTIES)
return (false);
if (proprt[provides] != 0)
return (true);
- if (provides2 == RAP_NUM_PROPERTIES)
+ if (provides2 == ARTP_NUM_PROPERTIES)
return (false);
if (proprt[provides2] != 0)
@@ -2017,41 +2018,41 @@ static bool _randart_is_redundant( const item_def &item,
}
static bool _randart_is_conflicting( const item_def &item,
- randart_properties_t &proprt )
+ artefact_properties_t &proprt )
{
if (item.base_type != OBJ_JEWELLERY)
return (false);
- randart_prop_type conflicts = RAP_NUM_PROPERTIES;
+ artefact_prop_type conflicts = ARTP_NUM_PROPERTIES;
switch (item.sub_type)
{
case RING_SUSTENANCE:
- conflicts = RAP_METABOLISM;
+ conflicts = ARTP_METABOLISM;
break;
case RING_FIRE:
case RING_ICE:
case RING_WIZARDRY:
case RING_MAGICAL_POWER:
- conflicts = RAP_PREVENT_SPELLCASTING;
+ conflicts = ARTP_PREVENT_SPELLCASTING;
break;
case RING_TELEPORTATION:
case RING_TELEPORT_CONTROL:
- conflicts = RAP_PREVENT_TELEPORTATION;
+ conflicts = ARTP_PREVENT_TELEPORTATION;
break;
case AMU_RESIST_MUTATION:
- conflicts = RAP_MUTAGENIC;
+ conflicts = ARTP_MUTAGENIC;
break;
case AMU_RAGE:
- conflicts = RAP_STEALTH;
+ conflicts = ARTP_STEALTH;
break;
}
- if (conflicts == RAP_NUM_PROPERTIES)
+ if (conflicts == ARTP_NUM_PROPERTIES)
return (false);
if (proprt[conflicts] != 0)
@@ -2060,12 +2061,12 @@ static bool _randart_is_conflicting( const item_def &item,
return (false);
}
-bool randart_is_bad( const item_def &item, randart_properties_t &proprt )
+bool randart_is_bad( const item_def &item, artefact_properties_t &proprt )
{
if (item.base_type == OBJ_BOOKS)
return (false);
- if (randart_wpn_num_props( proprt ) == 0)
+ if (artefact_wpn_num_props( proprt ) == 0)
return (true);
return (_randart_is_redundant( item, proprt )
@@ -2074,8 +2075,8 @@ bool randart_is_bad( const item_def &item, randart_properties_t &proprt )
bool randart_is_bad( const item_def &item )
{
- randart_properties_t proprt;
- randart_wpn_properties( item, proprt );
+ artefact_properties_t proprt;
+ artefact_wpn_properties( item, proprt );
return randart_is_bad( item, proprt);
}
@@ -2099,23 +2100,23 @@ bool make_item_blessed_blade( item_def &item )
for (vec_size i = 0; i < RA_PROPERTIES; i++)
known[i] = (bool) false;
- ASSERT(!item.props.exists( RANDART_PROPS_KEY ));
- item.props[RANDART_PROPS_KEY].new_vector(SV_SHORT).resize(RA_PROPERTIES);
- CrawlVector &rap = item.props[RANDART_PROPS_KEY];
+ ASSERT(!item.props.exists( ARTEFACT_PROPS_KEY ));
+ item.props[ARTEFACT_PROPS_KEY].new_vector(SV_SHORT).resize(RA_PROPERTIES);
+ CrawlVector &rap = item.props[ARTEFACT_PROPS_KEY];
rap.set_max_size(RA_PROPERTIES);
for (vec_size i = 0; i < RA_PROPERTIES; i++)
rap[i] = (short) 0;
// blessed blade of the Shining One
- rap[RAP_BRAND] = (short) SPWPN_HOLY_WRATH;
+ rap[ARTP_BRAND] = (short) SPWPN_HOLY_WRATH;
// set artefact name
- ASSERT(!item.props.exists( RANDART_NAME_KEY ));
- item.props[RANDART_NAME_KEY].get_string() = "Blessed Blade";
+ ASSERT(!item.props.exists( ARTEFACT_NAME_KEY ));
+ item.props[ARTEFACT_NAME_KEY].get_string() = "Blessed Blade";
// set artefact appearance
- ASSERT(!item.props.exists( RANDART_APPEAR_KEY ));
- item.props[RANDART_APPEAR_KEY].get_string() = "brightly glowing blade";
+ ASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY ));
+ item.props[ARTEFACT_APPEAR_KEY].get_string() = "brightly glowing blade";
// in case this is ever needed anywhere
item.special = (random_int() & RANDART_SEED_MASK);
@@ -2154,8 +2155,8 @@ bool make_item_randart( item_def &item )
return (false);
ASSERT(!item.props.exists( KNOWN_PROPS_KEY ));
- ASSERT(!item.props.exists( RANDART_NAME_KEY ));
- ASSERT(!item.props.exists( RANDART_APPEAR_KEY ));
+ ASSERT(!item.props.exists( ARTEFACT_NAME_KEY ));
+ ASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY ));
item.props[KNOWN_PROPS_KEY].new_vector(SV_BOOL).resize(RA_PROPERTIES);
CrawlVector &known = item.props[KNOWN_PROPS_KEY];
known.set_max_size(RA_PROPERTIES);
@@ -2176,7 +2177,7 @@ bool make_item_randart( item_def &item )
// Something went wrong that no amount of changing
// item.special will fix.
item.special = 0;
- item.props.erase(RANDART_PROPS_KEY);
+ item.props.erase(ARTEFACT_PROPS_KEY);
item.props.erase(KNOWN_PROPS_KEY);
item.flags &= ~ISFLAG_RANDART;
return (false);
@@ -2186,16 +2187,16 @@ bool make_item_randart( item_def &item )
|| god_gift != GOD_NO_GOD && !_god_fits_artefact(god_gift, item));
// get true artefact name
- if (item.props.exists( RANDART_NAME_KEY ))
- ASSERT(item.props[RANDART_NAME_KEY].get_type() == SV_STR);
+ if (item.props.exists( ARTEFACT_NAME_KEY ))
+ ASSERT(item.props[ARTEFACT_NAME_KEY].get_type() == SV_STR);
else
- item.props[RANDART_NAME_KEY].get_string() = artefact_name(item, false);
+ item.props[ARTEFACT_NAME_KEY].get_string() = artefact_name(item, false);
// get artefact appearance
- if (item.props.exists( RANDART_APPEAR_KEY ))
- ASSERT(item.props[RANDART_APPEAR_KEY].get_type() == SV_STR);
+ if (item.props.exists( ARTEFACT_APPEAR_KEY ))
+ ASSERT(item.props[ARTEFACT_APPEAR_KEY].get_type() == SV_STR);
else
- item.props[RANDART_APPEAR_KEY].get_string() = artefact_name(item, true);
+ item.props[ARTEFACT_APPEAR_KEY].get_string() = artefact_name(item, true);
return (true);
}
@@ -2221,7 +2222,7 @@ bool make_item_unrandart( item_def &item, int unrand_index )
item.flags |= ISFLAG_UNRANDART;
_init_randart_properties(item);
- item.special = unrand->prpty[RAP_BRAND];
+ item.special = unrand->prpty[ARTP_BRAND];
if (item.special != 0)
{
do_curse_item( item );
@@ -2232,12 +2233,12 @@ bool make_item_unrandart( item_def &item, int unrand_index )
}
// get true artefact name
- ASSERT(!item.props.exists( RANDART_NAME_KEY ));
- item.props[RANDART_NAME_KEY].get_string() = unrand->name;
+ ASSERT(!item.props.exists( ARTEFACT_NAME_KEY ));
+ item.props[ARTEFACT_NAME_KEY].get_string() = unrand->name;
// get artefact appearance
- ASSERT(!item.props.exists( RANDART_APPEAR_KEY ));
- item.props[RANDART_APPEAR_KEY].get_string() = unrand->unid_name;
+ ASSERT(!item.props.exists( ARTEFACT_APPEAR_KEY ));
+ item.props[ARTEFACT_APPEAR_KEY].get_string() = unrand->unid_name;
set_unrandart_exist( unrand_index, true );
@@ -2256,14 +2257,14 @@ const char *unrandart_descrip( int which_descrip, const item_def &item )
: "Unknown.");
}
-void randart_set_properties( item_def &item,
- randart_properties_t &proprt )
+void artefact_set_properties( item_def &item,
+ artefact_properties_t &proprt )
{
ASSERT( is_random_artefact( item ) );
ASSERT( !is_unrandom_artefact ( item ) );
- ASSERT( item.props.exists( RANDART_PROPS_KEY ) );
+ ASSERT( item.props.exists( ARTEFACT_PROPS_KEY ) );
- CrawlVector &rap_vec = item.props[RANDART_PROPS_KEY].get_vector();
+ CrawlVector &rap_vec = item.props[ARTEFACT_PROPS_KEY].get_vector();
ASSERT( rap_vec.get_type() == SV_SHORT );
ASSERT( rap_vec.size() == RA_PROPERTIES);
ASSERT( rap_vec.get_max_size() == RA_PROPERTIES);
@@ -2272,15 +2273,15 @@ void randart_set_properties( item_def &item,
rap_vec[i].get_short() = proprt[i];
}
-void randart_set_property( item_def &item,
- randart_prop_type prop,
- int val )
+void artefact_set_property( item_def &item,
+ artefact_prop_type prop,
+ int val )
{
ASSERT( is_random_artefact( item ) );
ASSERT( !is_unrandom_artefact ( item ) );
- ASSERT( item.props.exists( RANDART_PROPS_KEY ) );
+ ASSERT( item.props.exists( ARTEFACT_PROPS_KEY ) );
- CrawlVector &rap_vec = item.props[RANDART_PROPS_KEY].get_vector();
+ CrawlVector &rap_vec = item.props[ARTEFACT_PROPS_KEY].get_vector();
ASSERT( rap_vec.get_type() == SV_SHORT );
ASSERT( rap_vec.size() == RA_PROPERTIES);
ASSERT( rap_vec.get_max_size() == RA_PROPERTIES);
diff --git a/crawl-ref/source/randart.h b/crawl-ref/source/randart.h
index cdc65e57c6..d939607de0 100644
--- a/crawl-ref/source/randart.h
+++ b/crawl-ref/source/randart.h
@@ -14,7 +14,7 @@
// used in files.cc, newgame.cc, randart.cc {dlb}
#define NO_UNRANDARTS 59
-#define RA_PROPERTIES RAP_NUM_PROPERTIES
+#define RA_PROPERTIES ARTP_NUM_PROPERTIES
// Reserving the upper bits for later expansion/versioning.
#define RANDART_SEED_MASK 0x00ffffff
@@ -39,8 +39,8 @@ std::string get_artefact_name( const item_def &item );
/* ***********************************************************************
* called from: spl-book
* *********************************************************************** */
-void set_randart_name( item_def &item, const std::string &name );
-void set_randart_appearance( item_def &item, const std::string &appear );
+void set_artefact_name( item_def &item, const std::string &name );
+void set_artefact_appearance( item_def &item, const std::string &appear );
/* ***********************************************************************
* called from: effects
@@ -59,36 +59,37 @@ bool does_unrandart_exist(int whun);
* *********************************************************************** */
int find_okay_unrandart(unsigned char aclass, unsigned char atype = OBJ_RANDOM);
-typedef FixedVector< int, RA_PROPERTIES > randart_properties_t;
-typedef FixedVector< bool, RA_PROPERTIES > randart_known_props_t;
+typedef FixedVector< int, RA_PROPERTIES > artefact_properties_t;
+typedef FixedVector< bool, RA_PROPERTIES > artefact_known_props_t;
/* ***********************************************************************
* called from: describe - fight - it_use2 - item_use - player
* *********************************************************************** */
-void randart_desc_properties( const item_def &item,
- randart_properties_t &proprt,
- randart_known_props_t &known,
- bool force_fake_props = false);
+void artefact_desc_properties( const item_def &item,
+ artefact_properties_t &proprt,
+ artefact_known_props_t &known,
+ bool force_fake_props = false);
-void randart_wpn_properties( const item_def &item,
- randart_properties_t &proprt,
- randart_known_props_t &known );
+void artefact_wpn_properties( const item_def &item,
+ artefact_properties_t &proprt,
+ artefact_known_props_t &known );
-void randart_wpn_properties( const item_def &item,
- randart_properties_t &proprt );
+void artefact_wpn_properties( const item_def &item,
+ artefact_properties_t &proprt );
-int randart_wpn_property( const item_def &item, randart_prop_type prop,
- bool &known );
+int artefact_wpn_property( const item_def &item, artefact_prop_type prop,
+ bool &known );
-int randart_wpn_property( const item_def &item, randart_prop_type prop );
+int artefact_wpn_property( const item_def &item, artefact_prop_type prop );
-int randart_known_wpn_property( const item_def &item, randart_prop_type prop );
+int artefact_known_wpn_property( const item_def &item,
+ artefact_prop_type prop );
-int randart_wpn_num_props( const item_def &item );
-int randart_wpn_num_props( const randart_properties_t &proprt );
+int artefact_wpn_num_props( const item_def &item );
+int artefact_wpn_num_props( const artefact_properties_t &proprt );
-void randart_wpn_learn_prop( item_def &item, randart_prop_type prop );
-bool randart_wpn_known_prop( const item_def &item, randart_prop_type prop );
+void artefact_wpn_learn_prop( item_def &item, artefact_prop_type prop );
+bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop );
/* ***********************************************************************
* called from: dungeon
@@ -103,7 +104,7 @@ bool make_item_unrandart( item_def &item, int unrand_index );
* called from: randart - debug
* *********************************************************************** */
bool randart_is_bad( const item_def &item );
-bool randart_is_bad( const item_def &item, randart_properties_t &proprt );
+bool randart_is_bad( const item_def &item, artefact_properties_t &proprt );
/* ***********************************************************************
* called from: files - newgame
@@ -119,11 +120,11 @@ int find_unrandart_index(const item_def &item);
/* ***********************************************************************
* called from: debug
* *********************************************************************** */
-void randart_set_properties( item_def &item,
- randart_properties_t &proprt );
-void randart_set_property( item_def &item,
- randart_prop_type prop,
- int val );
+void artefact_set_properties( item_def &item,
+ artefact_properties_t &proprt );
+void artefact_set_property( item_def &item,
+ artefact_prop_type prop,
+ int val );
/* ***********************************************************************
* called from: mapdef
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 2c344b8a2b..62fc391103 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3537,7 +3537,7 @@ bool is_chaotic_item(const item_def& item)
break;
}
- if (is_random_artefact(item) && randart_wpn_property(item, RAP_MUTAGENIC))
+ if (is_random_artefact(item) && artefact_wpn_property(item, ARTP_MUTAGENIC))
retval = true;
return (retval);
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 307873610c..09ecd06ad0 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -264,8 +264,8 @@ static bool _in_a_shop( int shopidx )
for (unsigned int i = 0; i < stock.size(); i++)
{
item_def& item = mitm[stock[i]];
- if (Options.autoinscribe_randarts && is_random_artefact(item))
- item.inscription = randart_auto_inscription(item);
+ if (Options.autoinscribe_artefacts && is_random_artefact(item))
+ item.inscription = artefact_auto_inscription(item);
}
// Deselect all.
@@ -515,97 +515,97 @@ static bool _purchase( int shop, int item_got, int cost, bool id )
// be returning just over 30 right now. Note that this isn't used
// as a multiple, its used in the old ring way: 7 * ret is added to
// the price of the artefact. -- bwr
-int randart_value( const item_def &item )
+int artefact_value( const item_def &item )
{
ASSERT( is_random_artefact( item ) );
int ret = 10;
- randart_properties_t prop;
- randart_wpn_properties( item, prop );
+ artefact_properties_t prop;
+ artefact_wpn_properties( item, prop );
// Brands are already accounted for via existing ego checks
// This should probably be more complex... but this isn't so bad:
- ret += 3 * prop[ RAP_AC ] + 3 * prop[ RAP_EVASION ]
- + 3 * prop[ RAP_ACCURACY ] + 3 * prop[ RAP_DAMAGE ]
- + 6 * prop[ RAP_STRENGTH ] + 6 * prop[ RAP_INTELLIGENCE ]
- + 6 * prop[ RAP_DEXTERITY ];
+ ret += 3 * prop[ ARTP_AC ] + 3 * prop[ ARTP_EVASION ]
+ + 3 * prop[ ARTP_ACCURACY ] + 3 * prop[ ARTP_DAMAGE ]
+ + 6 * prop[ ARTP_STRENGTH ] + 6 * prop[ ARTP_INTELLIGENCE ]
+ + 6 * prop[ ARTP_DEXTERITY ];
// These resistances have meaningful levels
- if (prop[ RAP_FIRE ] > 0)
- ret += 5 + 5 * (prop[ RAP_FIRE ] * prop[ RAP_FIRE ]);
- else if (prop[ RAP_FIRE ] < 0)
+ if (prop[ ARTP_FIRE ] > 0)
+ ret += 5 + 5 * (prop[ ARTP_FIRE ] * prop[ ARTP_FIRE ]);
+ else if (prop[ ARTP_FIRE ] < 0)
ret -= 10;
- if (prop[ RAP_COLD ] > 0)
- ret += 5 + 5 * (prop[ RAP_COLD ] * prop[ RAP_COLD ]);
- else if (prop[ RAP_COLD ] < 0)
+ if (prop[ ARTP_COLD ] > 0)
+ ret += 5 + 5 * (prop[ ARTP_COLD ] * prop[ ARTP_COLD ]);
+ else if (prop[ ARTP_COLD ] < 0)
ret -= 10;
// These normally come alone or in resist/susceptible pairs...
// we're making items a bit more expensive if they have both positive.
- if (prop[ RAP_FIRE ] > 0 && prop[ RAP_COLD ] > 0)
+ if (prop[ ARTP_FIRE ] > 0 && prop[ ARTP_COLD ] > 0)
ret += 20;
- if (prop[ RAP_NEGATIVE_ENERGY ] > 0)
- ret += 5 + 5 * (prop[RAP_NEGATIVE_ENERGY] * prop[RAP_NEGATIVE_ENERGY]);
+ if (prop[ ARTP_NEGATIVE_ENERGY ] > 0)
+ ret += 5 + 5 * (prop[ARTP_NEGATIVE_ENERGY] * prop[ARTP_NEGATIVE_ENERGY]);
// only one meaningful level:
- if (prop[ RAP_POISON ])
+ if (prop[ ARTP_POISON ])
ret += 15;
// only one meaningful level (hard to get):
- if (prop[ RAP_ELECTRICITY ])
+ if (prop[ ARTP_ELECTRICITY ])
ret += 30;
// magic resistance is from 35-100
- if (prop[ RAP_MAGIC ])
- ret += 5 + prop[ RAP_MAGIC ] / 15;
+ if (prop[ ARTP_MAGIC ])
+ ret += 5 + prop[ ARTP_MAGIC ] / 15;
- if (prop[ RAP_EYESIGHT ])
+ if (prop[ ARTP_EYESIGHT ])
ret += 10;
// abilities:
- if (prop[ RAP_LEVITATE ])
+ if (prop[ ARTP_LEVITATE ])
ret += 3;
- if (prop[ RAP_BLINK ])
+ if (prop[ ARTP_BLINK ])
ret += 3;
- if (prop[ RAP_CAN_TELEPORT ])
+ if (prop[ ARTP_CAN_TELEPORT ])
ret += 5;
- if (prop[ RAP_BERSERK ])
+ if (prop[ ARTP_BERSERK ])
ret += 5;
- if (prop[ RAP_MAPPING ])
+ if (prop[ ARTP_MAPPING ])
ret += 15;
- if (prop[ RAP_INVISIBLE ])
+ if (prop[ ARTP_INVISIBLE ])
ret += 20;
- if (prop[ RAP_ANGRY ])
+ if (prop[ ARTP_ANGRY ])
ret -= 3;
- if (prop[ RAP_CAUSE_TELEPORTATION ])
+ if (prop[ ARTP_CAUSE_TELEPORTATION ])
ret -= 3;
- if (prop[ RAP_NOISES ])
+ if (prop[ ARTP_NOISES ])
ret -= 5;
- if (prop[ RAP_PREVENT_TELEPORTATION ])
+ if (prop[ ARTP_PREVENT_TELEPORTATION ])
ret -= 8;
- if (prop[ RAP_PREVENT_SPELLCASTING ])
+ if (prop[ ARTP_PREVENT_SPELLCASTING ])
ret -= 10;
// ranges from 2-5
- if (prop[ RAP_MUTAGENIC ])
- ret -= (5 + 3 * prop[ RAP_MUTAGENIC ]);
+ if (prop[ ARTP_MUTAGENIC ])
+ ret -= (5 + 3 * prop[ ARTP_MUTAGENIC ]);
// ranges from 1-3
- if (prop[ RAP_METABOLISM ])
- ret -= (2 * prop[ RAP_METABOLISM ]);
+ if (prop[ ARTP_METABOLISM ])
+ ret -= (2 * prop[ ARTP_METABOLISM ]);
return ((ret > 0) ? ret : 0);
}
@@ -915,7 +915,7 @@ unsigned int item_value( item_def item, bool ident )
if (is_random_artefact(item))
{
if (item_type_known(item))
- valued += (7 * randart_value(item));
+ valued += (7 * artefact_value(item));
else
valued += 50;
}
@@ -1228,7 +1228,7 @@ unsigned int item_value( item_def item, bool ident )
if (is_random_artefact( item ))
{
if (item_type_known(item))
- valued += (7 * randart_value( item ));
+ valued += (7 * artefact_value( item ));
else
valued += 50;
}
@@ -1597,9 +1597,9 @@ unsigned int item_value( item_def item, bool ident )
// in this branch we're guaranteed to know
// the item type!
if (valued < 0)
- valued = randart_value( item ) - 5;
+ valued = artefact_value( item ) - 5;
else
- valued += randart_value( item );
+ valued += artefact_value( item );
}
valued *= 7;
diff --git a/crawl-ref/source/shopping.h b/crawl-ref/source/shopping.h
index fb9fc2e88c..52b298855d 100644
--- a/crawl-ref/source/shopping.h
+++ b/crawl-ref/source/shopping.h
@@ -13,7 +13,7 @@
#include "externs.h"
#include "itemname.h"
-int randart_value( const item_def &item );
+int artefact_value( const item_def &item );
// ident == true overrides the item ident level and gives the price
// as if the item was fully id'd
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 6dceab91c7..57a69b3377 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -77,7 +77,7 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink)
}
// yes, there is a logic to this ordering {dlb}:
- if (scan_randarts(RAP_PREVENT_TELEPORTATION) && !wizard_blink)
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION) && !wizard_blink)
mpr("You feel a weird sense of stasis.");
else if (you.level_type == LEVEL_ABYSS
&& _abyss_blocks_teleport(high_level_controlled_blink)
@@ -199,7 +199,7 @@ void random_blink(bool allow_partial_control, bool override_abyss)
bool success = false;
coord_def target;
- if (scan_randarts(RAP_PREVENT_TELEPORTATION))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION))
mpr("You feel a weird sense of stasis.");
else if (you.level_type == LEVEL_ABYSS
&& !override_abyss && !one_chance_in(3))
@@ -454,8 +454,8 @@ void identify(int power, int item_slot)
set_ident_type(item, ID_KNOWN_TYPE);
set_ident_flags(item, ISFLAG_IDENT_MASK);
- if (Options.autoinscribe_randarts && is_random_artefact(item))
- add_autoinscription( item, randart_auto_inscription(item));
+ if (Options.autoinscribe_artefacts && is_random_artefact(item))
+ add_autoinscription( item, artefact_auto_inscription(item));
// For scrolls, now id the scroll, unless already known.
if (power == -1
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index b4a4ed0dd4..99bed5eb38 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1244,7 +1244,7 @@ bool allow_control_teleport(bool quiet)
void you_teleport(void)
{
- if (scan_randarts(RAP_PREVENT_TELEPORTATION))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION))
mpr("You feel a weird sense of stasis.");
else if (you.duration[DUR_TELEPORT])
{
@@ -1271,7 +1271,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
&& player_control_teleport()
&& allow_control_teleport());
- if (scan_randarts(RAP_PREVENT_TELEPORTATION))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION))
{
mpr("You feel a strange sense of stasis.");
return (false);
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 484ac98528..c400cbf099 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -2300,7 +2300,7 @@ bool make_book_level_randart(item_def &book, int level, int num_spells,
name += bookname;
- set_randart_name(book, name);
+ set_artefact_name(book, name);
return (true);
}
@@ -2899,7 +2899,7 @@ bool make_book_theme_randart(item_def &book, int disc1, int disc2,
}
}
- set_randart_name(book, name);
+ set_artefact_name(book, name);
book.plus = disc1;
book.plus2 = disc2;
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index ca8cfd5cc4..4570eeb7aa 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -403,9 +403,9 @@ bool check_transformation_stat_loss(const std::set<equipment_type> &remove,
if (is_random_artefact(item))
{
- prop_str += randart_known_wpn_property(item, RAP_STRENGTH);
- prop_int += randart_known_wpn_property(item, RAP_INTELLIGENCE);
- prop_dex += randart_known_wpn_property(item, RAP_DEXTERITY);
+ prop_str += artefact_known_wpn_property(item, ARTP_STRENGTH);
+ prop_int += artefact_known_wpn_property(item, ARTP_INTELLIGENCE);
+ prop_dex += artefact_known_wpn_property(item, ARTP_DEXTERITY);
}
// Since there might be multiple items whose effects cancel each other
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 33832cca83..e05e0e0309 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -562,7 +562,7 @@ static void _try_brand_switch(const int item_index)
}
if (is_random_artefact(item))
- randart_set_property(item, RAP_BRAND, brand);
+ artefact_set_property(item, ARTP_BRAND, brand);
else
item.special = brand;
}
@@ -940,10 +940,10 @@ static void _do_chaos_upgrade(item_def &item, const monsters* mon)
if (is_random_artefact(item))
{
- randart_set_property(item, RAP_BRAND, brand);
+ artefact_set_property(item, ARTP_BRAND, brand);
if (seen)
- randart_wpn_learn_prop(item, RAP_BRAND);
+ artefact_wpn_learn_prop(item, ARTP_BRAND);
}
else
{
@@ -1667,7 +1667,7 @@ static bool _xom_is_good(int sever, int tension)
else if (x_chance_in_y(11, sever) && you.level_type != LEVEL_ABYSS)
{
// Try something else if teleportation is impossible.
- if (scan_randarts(RAP_PREVENT_TELEPORTATION))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION))
return (false);
// This is not very interesting if the level is already fully
@@ -2674,7 +2674,7 @@ static bool _xom_is_bad(int sever, int tension)
else if (x_chance_in_y(7, sever) && you.level_type != LEVEL_ABYSS)
{
// Try something else if teleportation is impossible.
- if (scan_randarts(RAP_PREVENT_TELEPORTATION))
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION))
return (false);
// This is not particularly exciting if the level is already