summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/randart.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 11:25:01 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 11:25:01 +0000
commit933b0c361d7ee4914b89e725a8886abb5f5e9d2c (patch)
tree6cd9a4618f4a953e519ba9b0af24d1a184e0b501 /crawl-ref/source/randart.h
parent82fa0cb1d1d28ae309754c0dbcd620c554f7f1d9 (diff)
downloadcrawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.tar.gz
crawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.zip
Fixed bad message with RAP_MAGICAL_POWER.
Type safety; this required moving randart_prop_type to enum.h. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2518 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.h')
-rw-r--r--crawl-ref/source/randart.h50
1 files changed, 7 insertions, 43 deletions
diff --git a/crawl-ref/source/randart.h b/crawl-ref/source/randart.h
index 27ff3a3b19..7658bce3c7 100644
--- a/crawl-ref/source/randart.h
+++ b/crawl-ref/source/randart.h
@@ -12,45 +12,8 @@
#ifndef RANDART_H
#define RANDART_H
-#include "enum.h"
#include "externs.h"
-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
-};
-
// used in files.cc, newgame.cc, randart.cc {dlb}
#define NO_UNRANDARTS 53
#define RA_PROPERTIES RAP_NUM_PROPERTIES
@@ -64,8 +27,9 @@ bool is_random_artefact( const item_def &item );
bool is_unrandom_artefact( const item_def &item );
bool is_fixed_artefact( const item_def &item );
-unique_item_status_type get_unique_item_status( int base_type, int type );
-void set_unique_item_status( int base_type, int type,
+unique_item_status_type get_unique_item_status( object_class_type base_type,
+ int type );
+void set_unique_item_status( object_class_type base_type, int type,
unique_item_status_type status );
/* ***********************************************************************
@@ -112,16 +76,16 @@ void randart_wpn_properties( const item_def &item,
void randart_wpn_properties( const item_def &item,
randart_properties_t &proprt );
-int randart_wpn_property( const item_def &item, int prop,
+int randart_wpn_property( const item_def &item, randart_prop_type prop,
bool &known );
-int randart_wpn_property( const item_def &item, int prop );
+int randart_wpn_property( const item_def &item, randart_prop_type prop );
int randart_wpn_num_props( const item_def &item );
int randart_wpn_num_props( const randart_properties_t &proprt );
-void randart_wpn_learn_prop( item_def &item, int prop );
-bool randart_wpn_known_prop( item_def &item, int prop );
+void randart_wpn_learn_prop( item_def &item, randart_prop_type prop );
+bool randart_wpn_known_prop( item_def &item, randart_prop_type prop );
/* ***********************************************************************
* called from: dungeon