From 1db9c68406e0892e1ac7331dfd3b412b31741cb7 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Fri, 5 Oct 2007 06:10:49 +0000 Subject: Shaft traps (trap doors) [1792195] and level annotation [1769009] added, with the shaft traps changed as per comments on SF; shafts aren't randomly generated yet, so this doesn't change gameplay. Changed DNGN_TRAP_III to DNGN_TRAP_NATURAL, of which trap type the shaft traps are the only current member. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2328 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/externs.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/externs.h') diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 4aa1b1935f..1a29da26da 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -63,6 +63,7 @@ const int kPathLen = 256; class item_def; class melee_attack; class coord_def; +class level_id; class actor { @@ -84,6 +85,8 @@ public: virtual size_type body_size(int psize = PSIZE_TORSO, bool base = false) const = 0; + virtual int body_weight() const = 0; + virtual int total_weight() const = 0; virtual int damage_type(int which_attack = -1) = 0; virtual int damage_brand(int which_attack = -1) = 0; @@ -156,6 +159,8 @@ public: virtual int res_negative_energy() const = 0; virtual flight_type flies() const = 0; + virtual bool is_levitating() const = 0; + virtual bool airborne() const; virtual bool paralysed() const = 0; virtual bool confused() const = 0; @@ -184,6 +189,10 @@ public: { return (true); } + + virtual bool will_trigger_shaft() const; + virtual level_id shaft_dest() const; + virtual bool do_shaft() = 0; }; struct coord_def @@ -729,6 +738,8 @@ public: bool submerged() const; bool floundering() const; size_type body_size(int psize = PSIZE_TORSO, bool base = false) const; + int body_weight() const; + int total_weight() const; int damage_type(int attk = -1); int damage_brand(int attk = -1); bool has_claws() const; @@ -778,6 +789,8 @@ public: int res_elec() const; int res_poison() const; int res_negative_energy() const; + bool confusable() const; + bool slowable() const; flight_type flies() const; @@ -813,6 +826,8 @@ public: // modify the player object. std::vector get_all_place_info(bool visited_only = false, bool dungeon_only = false) const; + + bool do_shaft(); }; extern player you; @@ -840,7 +855,6 @@ public: }; class ghost_demon; -class level_id; class mon_enchant { @@ -980,6 +994,8 @@ public: bool can_drown() const; bool floundering() const; size_type body_size(int psize = PSIZE_TORSO, bool base = false) const; + int body_weight() const; + int total_weight() const; int damage_type(int attk = -1); int damage_brand(int attk = -1); @@ -1041,6 +1057,7 @@ public: int res_negative_energy() const; flight_type flies() const; + bool is_levitating() const; bool invisible() const; bool can_see_invisible() const; bool visible_to(actor *looker); @@ -1085,6 +1102,8 @@ public: static int base_speed(int mcls); + bool do_shaft(); + private: void init_with(const monsters &mons); void swap_slots(mon_inv_type a, mon_inv_type b); -- cgit v1.2.3-54-g00ecf