diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/delay.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 51 | ||||
-rw-r--r-- | crawl-ref/source/describe.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 23 | ||||
-rw-r--r-- | crawl-ref/source/item_use.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 150 | ||||
-rw-r--r-- | crawl-ref/source/libgui.cc | 22 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 24 | ||||
-rw-r--r-- | crawl-ref/source/misc.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/mon-pick.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 36 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 80 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/spells2.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/spells4.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/tile1.cc | 195 |
19 files changed, 268 insertions, 394 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index ca8da8a4ee..525a3c56c1 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2337,7 +2337,7 @@ void process_command( command_type cmd ) break; case CMD_INSCRIBE_ITEM: - inscribe_item(); + prompt_inscribe_item(); break; #ifdef WIZARD diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 77c9d18412..6df2378d7c 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -56,9 +56,9 @@ static void handle_run_delays(const delay_queue_item &delay); static void handle_macro_delay(); static void finish_delay(const delay_queue_item &delay); -// monster cannot be affected in these states -// (all results of Recite, plus friendly + stupid; -// note that berserk monsters are also hasted) +// Monsters cannot be affected in these states. +// (All results of Recite, plus friendly + stupid; +// note that berserk monsters are also hasted.) static bool recite_mons_useless(const monsters *mon) { return (mons_intel(mon->type) < I_NORMAL @@ -482,9 +482,7 @@ void stop_delay( bool stop_stair_travel ) mpr("All blood oozes out of the corpse!"); bleed_onto_floor(you.x_pos, you.y_pos, corpse.plus, delay.duration, false); - corpse.sub_type = CORPSE_SKELETON; - corpse.special = 90; - corpse.colour = LIGHTGREY; + turn_corpse_into_skeleton(corpse, 90); } did_god_conduct(DID_DRINK_BLOOD, 8); pop_delay(); @@ -1012,11 +1010,7 @@ static void finish_delay(const delay_queue_item &delay) dec_mitm_item_quantity( delay.parm2, 1 ); } else if (!one_chance_in(4)) - { - corpse.sub_type = CORPSE_SKELETON; - corpse.special = 90; - corpse.colour = LIGHTGREY; - } + turn_corpse_into_skeleton(corpse, 90); break; } case DELAY_MEMORISE: @@ -1166,6 +1160,7 @@ static void finish_delay(const delay_queue_item &delay) } offer_corpse(delay.parm1); + StashTrack.update_stash(); // Don't stash-track this corpse anymore. break; } case DELAY_DROP_ITEM: diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 18007cd6ea..afe37a0704 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1975,7 +1975,58 @@ void describe_item( item_def &item, bool allow_inscribe ) getch(); } +void inscribe_item(item_def &item) +{ + mpr(item.name(DESC_INVENTORY).c_str(), MSGCH_EQUIPMENT); + + std::string ainscrip; + + if (is_random_artefact(item)) + ainscrip = _randart_auto_inscription(item); + + // Only allow autoinscription if we don't have all the text + // already. + const bool autoinscribe = + is_random_artefact(item) + && !ainscrip.empty() + && item.inscription.find(ainscrip) == std::string::npos; + + mprf( MSGCH_PROMPT, "Inscribe with what%s? ", + autoinscribe ? " ('a' to autoinscribe)" : "" ); + + char buf[79]; + if (!cancelable_get_line(buf, sizeof buf)) + { + // Strip spaces from the end. + for (int i = strlen(buf) - 1; i >= 0; i--) + { + if (isspace( buf[i] )) + buf[i] = 0; + else + break; + } + + if (autoinscribe && buf[1] == 0 && (buf[0] == 'a' || buf[0] == 'A')) + { + // Remove previous randart inscription + _trim_randart_inscrip(item); + + if (!item.inscription.empty()) + item.inscription += ", "; + item.inscription += ainscrip; + } + else + item.inscription = std::string(buf); + + mpr(item.name(DESC_INVENTORY).c_str(), MSGCH_EQUIPMENT); + you.wield_change = true; + } + else + { + canned_msg(MSG_OK); + } +} //--------------------------------------------------------------- // // describe_spell diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h index 892922e4ac..4736239849 100644 --- a/crawl-ref/source/describe.h +++ b/crawl-ref/source/describe.h @@ -57,6 +57,7 @@ void describe_feature_wide(int x, int y); * called from: item_use - shopping * *********************************************************************** */ void describe_item( item_def &item, bool allow_inscribe = false ); +void inscribe_item( item_def &item ); /* *********************************************************************** * called from: direct diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 53156bdcb3..e2d69263c6 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2352,8 +2352,9 @@ static void rot_inventory_food(long time_delta) continue; } + // Carried skeletons are not destroyed. if (you.inv[i].sub_type == CORPSE_SKELETON) - continue; // carried skeletons are not destroyed + continue; if (!mons_skeleton( you.inv[i].plus )) { @@ -2365,9 +2366,7 @@ static void rot_inventory_food(long time_delta) continue; } - you.inv[i].sub_type = CORPSE_SKELETON; - you.inv[i].special = 0; - you.inv[i].colour = LIGHTGREY; + turn_corpse_into_skeleton(you.inv[i]); you.wield_change = true; burden_changed_by_rot = true; continue; @@ -3009,11 +3008,7 @@ void update_corpses(double elapsedTime) destroy_item(c); } else - { - it.sub_type = CORPSE_SKELETON; - it.special = 200; - it.colour = LIGHTGREY; - } + turn_corpse_into_skeleton(it); } } else diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index d63f7cca1d..f8eae1a32f 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -183,14 +183,14 @@ static bool _find_butchering_implement( bool fallback ) "for butchering."); return (false); } - // no switching necessary + // No switching necessary. if (can_cut_meat( *wpn )) return (false); } int old_weapon = you.equip[EQ_WEAPON]; - // look for a butchering implement in your pack + // Look for a butchering implement in your pack. for (int i = 0; i < ENDOFPACK; ++i) { if (is_valid_item( you.inv[i] ) @@ -339,7 +339,7 @@ static bool _have_corpses_in_pack(bool remind) if (!is_valid_item( obj )) continue; - if (obj.base_type == OBJ_CORPSES) + if (obj.base_type == OBJ_CORPSES && obj.sub_type == CORPSE_BODY) num++; } @@ -371,8 +371,7 @@ static bool _have_corpses_in_pack(bool remind) else { text << "If you dropped the " << noun << " in your pack on solid " - << "ground or into shallow water then you could " << verb - << " " << pronoun << "."; + << "ground then you could " << verb << " " << pronoun << "."; } mpr(text.str().c_str()); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5e8865a723..8799354ac7 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3481,10 +3481,9 @@ void zap_wand( int slot ) you.turn_is_over = true; } // end zap_wand() -void inscribe_item() +void prompt_inscribe_item() { int item_slot; - char buf[79]; if (inv_count() < 1) { mpr("You don't have anything to inscribe."); @@ -3497,26 +3496,8 @@ void inscribe_item() canned_msg( MSG_OK ); return; } - mpr( you.inv[item_slot].name(DESC_INVENTORY).c_str(), MSGCH_EQUIPMENT ); - mpr( "Inscribe with what? ", MSGCH_PROMPT ); - if (!cancelable_get_line(buf, sizeof buf)) - { - // strip spaces from the end - for (int i = strlen(buf) - 1; i >= 0; i--) - { - if (isspace( buf[i] )) - buf[i] = 0; - else - break; - } - you.inv[item_slot].inscription = std::string(buf); - you.wield_change = true; - } - else - { - canned_msg(MSG_OK); - } + inscribe_item(you.inv[item_slot]); } void drink( int slot ) diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index f59a384931..311d687317 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -166,7 +166,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport=false, int acc_bonus=0, bool thrown_object_destroyed( item_def *item, int x, int y, bool returning ); -void inscribe_item(); +void prompt_inscribe_item(); int launcher_shield_slowdown(const item_def &launcher, const item_def *shield); int launcher_final_speed(const item_def &launcher, diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index a8a7d9811c..5ae4aa1229 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -455,7 +455,7 @@ void unlink_item( int dest ) bool linked = false; int old_link = mitm[dest].link; // used to try linking the first - // clean the relevant parts of the object: + // Clean the relevant parts of the object. mitm[dest].base_type = OBJ_UNASSIGNED; mitm[dest].quantity = 0; mitm[dest].x = 0; @@ -627,7 +627,7 @@ void destroy_item_stack( int x, int y, int cause ) item_was_destroyed(mitm[o], cause); mitm[o].base_type = OBJ_UNASSIGNED; - mitm[o].quantity = 0; + mitm[o].quantity = 0; mitm[o].props.clear(); } @@ -640,38 +640,36 @@ static bool _invisible_to_player( const item_def& item ) return strstr(item.inscription.c_str(), "=k") != 0; } -static int count_nonsquelched_items( int obj ) +static int _count_nonsquelched_items( int obj ) { int result = 0; - while ( obj != NON_ITEM ) + while (obj != NON_ITEM) { - if ( !_invisible_to_player(mitm[obj]) ) + if (!_invisible_to_player(mitm[obj])) ++result; obj = mitm[obj].link; } return result; } -/* Fill items with the items on a square. - Squelched items (marked with =k) are ignored, unless - the square contains *only* squelched items, in which case they - are included. If force_squelch is true, squelched items are - never displayed. - */ +// Fill items with the items on a square. +// Squelched items (marked with =k) are ignored, unless +// the square contains *only* squelched items, in which case they +// are included. If force_squelch is true, squelched items are +// never displayed. static void _item_list_on_square( std::vector<const item_def*>& items, int obj, bool force_squelch ) { - const bool have_nonsquelched = (force_squelch || - count_nonsquelched_items(obj)); + const bool have_nonsquelched = (force_squelch + || _count_nonsquelched_items(obj)); - /* loop through the items */ + // Loop through the items. while ( obj != NON_ITEM ) { - /* add them to the items list if they qualify */ + // Add them to the items list if they qualify. if ( !have_nonsquelched || !_invisible_to_player(mitm[obj]) ) - { items.push_back( &mitm[obj] ); - } + obj = mitm[obj].link; } } @@ -687,16 +685,18 @@ void request_autopickup(bool do_pickup) } // 2 - artefact, 1 - glowing/runed, 0 - mundane -static int item_name_specialness(const item_def& item) +static int _item_name_specialness(const item_def& item) { // All jewellery is worth looking at. // And we can always tell from the name if it's an artefact. if (item.base_type == OBJ_JEWELLERY ) return ( is_artefact(item) ? 2 : 1 ); - if (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_ARMOUR && - item.base_type != OBJ_MISSILES) + if (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_ARMOUR + && item.base_type != OBJ_MISSILES) + { return 0; + } if (item_type_known(item)) { if ( is_artefact(item) ) @@ -721,8 +721,9 @@ static int item_name_specialness(const item_def& item) return ( branded ? 1 : 0 ); } + // Missiles don't get name descriptors. if (item.base_type == OBJ_MISSILES) - return 0; // missiles don't get name descriptors + return 0; std::string itname = item.name(DESC_PLAIN, false, false, false); lowercase(itname); @@ -740,7 +741,7 @@ static int item_name_specialness(const item_def& item) // You can tell something is an artefact, because it'll have a // description which rules out anything else. - // XXX Fixedarts and unrandarts might upset the apple-cart, though. + // XXX: Fixedarts and unrandarts might upset the apple-cart, though. if ( is_artefact(item) ) return 2; @@ -760,7 +761,7 @@ void item_check(bool verbose) if (items.size() == 0) { - if ( verbose ) + if (verbose) strm << "There are no items here." << std::endl; return; } @@ -783,7 +784,7 @@ void item_check(bool verbose) unsigned short glyph_col; get_item_glyph( items[i], &glyph_char, &glyph_col ); item_chars.push_back( glyph_char * 0x100 + - (10 - item_name_specialness(*(items[i]))) ); + (10 - _item_name_specialness(*(items[i]))) ); } std::sort(item_chars.begin(), item_chars.end()); @@ -794,10 +795,10 @@ void item_check(bool verbose) const int specialness = 10 - (item_chars[i] % 0x100); if ( specialness != cur_state ) { - switch ( specialness ) + switch (specialness) { - case 2: out_string += "<yellow>"; break; // artefact - case 1: out_string += "<white>"; break; // glowing/runed + case 2: out_string += "<yellow>"; break; // artefact + case 1: out_string += "<white>"; break; // glowing/runed case 0: out_string += "<darkgrey>"; break; // mundane } cur_state = specialness; @@ -929,25 +930,31 @@ void origin_set_inventory(void (*oset)(item_def &item)) oset(you.inv[i]); } -static int first_corpse_monnum(int x, int y) +static int _first_corpse_monnum(int x, int y) { // We could look for a corpse on this square and assume that the // items belonged to it, but that is unsatisfactory. + + // Actually, it would be easy to add the monster type to a corpse + // (or to another item) by setting orig_monnum when the monster dies + // (already done for unique monsters to get named zombies), but + // personally, I rather like the way the player can't tell where an + // item came from if he just finds it lying on the floor. (jpeg) return (0); } #ifdef DGL_MILESTONES -static std::string milestone_rune(const item_def &item) +static std::string _milestone_rune(const item_def &item) { return std::string("found ") + item.name(DESC_NOCAP_A) + "."; } -static void milestone_check(const item_def &item) +static void _milestone_check(const item_def &item) { if (item.base_type == OBJ_MISCELLANY && item.sub_type == MISC_RUNE_OF_ZOT) { - mark_milestone("rune", milestone_rune(item)); + mark_milestone("rune", _milestone_rune(item)); } else if (item.base_type == OBJ_ORBS && item.sub_type == ORB_ZOT) { @@ -956,7 +963,7 @@ static void milestone_check(const item_def &item) } #endif // DGL_MILESTONES -static void check_note_item(item_def &item) +static void _check_note_item(item_def &item) { if (!(item.flags & ISFLAG_NOTED_GET) && is_interesting_item(item)) { @@ -973,7 +980,7 @@ static void check_note_item(item_def &item) void origin_set(int x, int y) { - int monnum = first_corpse_monnum(x, y); + int monnum = _first_corpse_monnum(x, y); unsigned short pplace = get_packed_place(); for (int link = igrd[x][y]; link != NON_ITEM; link = mitm[link].link) { @@ -984,15 +991,16 @@ void origin_set(int x, int y) if (!item.orig_monnum) item.orig_monnum = static_cast<short>( monnum ); item.orig_place = pplace; + #ifdef DGL_MILESTONES - milestone_check(item); + _milestone_check(item); #endif } } void origin_set_monstercorpse(item_def &item, int x, int y) { - item.orig_monnum = first_corpse_monnum(x, y); + item.orig_monnum = _first_corpse_monnum(x, y); } static void _origin_freeze(item_def &item, int x, int y) @@ -1003,9 +1011,10 @@ static void _origin_freeze(item_def &item, int x, int y) origin_set_monstercorpse(item, x, y); item.orig_place = get_packed_place(); - check_note_item(item); + _check_note_item(item); + #ifdef DGL_MILESTONES - milestone_check(item); + _milestone_check(item); #endif } } @@ -1175,7 +1184,7 @@ void pickup() } int o = igrd[you.x_pos][you.y_pos]; - const int num_nonsquelched = count_nonsquelched_items(o); + const int num_nonsquelched = _count_nonsquelched_items(o); if (o == NON_ITEM) { @@ -1355,7 +1364,7 @@ bool items_stack( const item_def &item1, const item_def &item2, return (true); } -static int userdef_find_free_slot(const item_def &i) +static int _userdef_find_free_slot(const item_def &i) { #ifdef CLUA_BINDINGS int slot = -1; @@ -1375,7 +1384,7 @@ int find_free_slot(const item_def &i) bool searchforward = false; // If we're doing Lua, see if there's a Lua function that can give // us a free slot. - int slot = userdef_find_free_slot(i); + int slot = _userdef_find_free_slot(i); if (slot == -2 || Options.assign_item_slot == SS_FORWARD) searchforward = true; @@ -1517,7 +1526,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet ) if (!quiet && partial_pickup) mpr("You can only carry some of what is here."); - check_note_item(mitm[obj]); + _check_note_item(mitm[obj]); // If the object on the ground is inscribed, but not // the one in inventory, then the inventory object @@ -1581,7 +1590,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet ) _autoinscribe_item( item ); _origin_freeze(item, you.x_pos, you.y_pos); - check_note_item(item); + _check_note_item(item); item.quantity = quant_got; if (is_blood_potion(mitm[obj])) @@ -1655,7 +1664,7 @@ void mark_items_non_pickup_at(const coord_def &pos) // calling code that "obj" is possibly modified. bool move_item_to_grid( int *const obj, int x, int y ) { - // must be a valid reference to a valid object + // Must be a valid reference to a valid object. if (*obj == NON_ITEM || !is_valid_item( mitm[*obj] )) return (false); @@ -1938,7 +1947,7 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) return (true); } -static std::string drop_menu_invstatus(const Menu *menu) +static std::string _drop_menu_invstatus(const Menu *menu) { char buf[100]; const int cap = carrying_capacity(BS_UNENCUMBERED); @@ -1965,9 +1974,9 @@ static std::string drop_menu_invstatus(const Menu *menu) return (buf); } -static std::string drop_menu_title(const Menu *menu, const std::string &oldt) +static std::string _drop_menu_title(const Menu *menu, const std::string &oldt) { - std::string res = drop_menu_invstatus(menu) + " " + oldt; + std::string res = _drop_menu_invstatus(menu) + " " + oldt; if (menu->is_set( MF_MULTISELECT )) res = "[Multidrop] " + res; @@ -1991,7 +2000,7 @@ int get_equip_slot(const item_def *item) return worn; } -static std::string drop_selitem_text( const std::vector<MenuEntry*> *s ) +static std::string _drop_selitem_text( const std::vector<MenuEntry*> *s ) { char buf[130]; bool extraturns = false; @@ -2022,7 +2031,7 @@ std::vector<SelItem> items_for_multidrop; // Arrange items that have been selected for multidrop so that // equipped items are dropped after other items, and equipped items // are dropped in the same order as their EQ_ slots are numbered. -static bool drop_item_order(const SelItem &first, const SelItem &second) +static bool _drop_item_order(const SelItem &first, const SelItem &second) { const item_def &i1 = you.inv[first.slot]; const item_def &i2 = you.inv[second.slot]; @@ -2057,8 +2066,8 @@ void drop(void) std::vector<SelItem> tmp_items; tmp_items = prompt_invent_items( "Drop what?", MT_DROP, -1, - drop_menu_title, true, true, 0, - &Options.drop_filter, drop_selitem_text, + _drop_menu_title, true, true, 0, + &Options.drop_filter, _drop_selitem_text, &items_for_multidrop ); if (tmp_items.empty()) @@ -2071,7 +2080,7 @@ void drop(void) // dropping a worn robe before a cloak (old behaviour: remove // cloak, remove robe, wear cloak, drop robe, remove cloak, drop // cloak). - std::sort( tmp_items.begin(), tmp_items.end(), drop_item_order ); + std::sort( tmp_items.begin(), tmp_items.end(), _drop_item_order ); // If the user answers "no" to an item an with a warning inscription, // then remove it from the list of items to drop by not copying it @@ -2170,33 +2179,32 @@ void autoinscribe() will_autoinscribe = false; } -static inline std::string autopickup_item_name(const item_def &item) +static inline std::string _autopickup_item_name(const item_def &item) { return userdef_annotate_item(STASH_LUA_SEARCH_ANNOTATE, &item, true) + item.name(DESC_PLAIN); } -static bool is_denied_autopickup(const item_def &item, std::string &iname) +static bool _is_denied_autopickup(const item_def &item, std::string &iname) { if (iname.empty()) - iname = autopickup_item_name(item); + iname = _autopickup_item_name(item); + for (unsigned i = 0, size = Options.never_pickup.size(); i < size; ++i) - { if (Options.never_pickup[i].matches(iname)) return (true); - } + return false; } -static bool is_forced_autopickup(const item_def &item, std::string &iname) +static bool _is_forced_autopickup(const item_def &item, std::string &iname) { if (iname.empty()) - iname = autopickup_item_name(item); + iname = _autopickup_item_name(item); + for (unsigned i = 0, size = Options.always_pickup.size(); i < size; ++i) - { if (Options.always_pickup[i].matches(iname)) return (true); - } return false; } @@ -2216,9 +2224,9 @@ bool item_needs_autopickup(const item_def &item) #ifdef CLUA_BINDINGS && clua.callbooleanfn(true, "ch_autopickup", "u", &item) #endif - || is_forced_autopickup(item, itemname)) + || _is_forced_autopickup(item, itemname)) && (Options.pickup_dropped || !(item.flags & ISFLAG_DROPPED)) - && !is_denied_autopickup(item, itemname)); + && !_is_denied_autopickup(item, itemname)); } bool can_autopickup() @@ -2244,7 +2252,7 @@ bool can_autopickup() return (true); } -static void do_autopickup() +static void _do_autopickup() { //David Loewenstern 6/99 int n_did_pickup = 0; @@ -2325,7 +2333,7 @@ static void do_autopickup() void autopickup() { _autoinscribe_floor_items(); - do_autopickup(); + _do_autopickup(); } int inv_count(void) @@ -2360,9 +2368,9 @@ item_def *find_floor_item(object_class_type cls, int sub_type) return (NULL); } -static bool find_subtype_by_name(item_def &item, - object_class_type base_type, int ntypes, - const std::string &name) +static bool _find_subtype_by_name(item_def &item, + object_class_type base_type, int ntypes, + const std::string &name) { // In order to get the sub-type, we'll fill out the base type... // then we're going to iterate over all possible subtype values @@ -2439,17 +2447,15 @@ item_def find_item_type(object_class_type base_type, std::string name) if (!max_subtype[i]) continue; - if (find_subtype_by_name(item, static_cast<object_class_type>(i), - max_subtype[i], name)) + if (_find_subtype_by_name(item, static_cast<object_class_type>(i), + max_subtype[i], name)) { break; } } } else - { - find_subtype_by_name(item, base_type, max_subtype[base_type], name); - } + _find_subtype_by_name(item, base_type, max_subtype[base_type], name); return (item); } diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index c45013a798..93f3c90cf8 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -1197,22 +1197,22 @@ int convert_cursor_pos(int mx, int my, int *cx, int *cy) return id; } -// assumes the item is equipped in the first place! +// NOTE: Assumes the item is equipped in the first place! static bool _is_true_equipped_item(item_def item) { - // weapons and staves are only truly equipped if wielded + // Weapons and staves are only truly equipped if wielded. if (item.link == you.equip[EQ_WEAPON]) return (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES); - // cursed armour and rings are only truly equipped if *not* wielded + // Cursed armour and rings are only truly equipped if *not* wielded. return (item.link != you.equip[EQ_WEAPON]); } -// returns whether there's any action you can take with an item in inventory -// apart from dropping it +// Returns whether there's any action you can take with an item in inventory +// apart from dropping it. static bool _can_use_item(item_def item, bool equipped) { - // vampires can drain corpses + // Vampires can drain corpses. if (item.base_type == OBJ_CORPSES) { return (you.species == SP_VAMPIRE @@ -1223,20 +1223,20 @@ static bool _can_use_item(item_def item, bool equipped) if (equipped && item_cursed(item)) { - // misc. items/rods can always be evoked, cursed or not + // Misc. items/rods can always be evoked, cursed or not. if (item.base_type == OBJ_MISCELLANY || item_is_rod(item)) return true; - // you can't unwield/fire a wielded cursed weapon/staff - // but cursed armour and rings can be unwielded without problems + // You can't unwield/fire a wielded cursed weapon/staff + // but cursed armour and rings can be unwielded without problems. return (!_is_true_equipped_item(item)); } - // mummies can't do anything with food or potions + // Mummies can't do anything with food or potions. if (you.species == SP_MUMMY) return (item.base_type != OBJ_POTIONS && item.base_type != OBJ_FOOD); - // in all other cases you can use the item in some way + // In all other cases you can use the item in some way. return true; } diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index f678914f3d..bc1b0a4df0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -139,6 +139,30 @@ static void create_monster_hide(int mons_class) move_item_to_grid( &o, you.x_pos, you.y_pos ); } +// Vampire draining corpses currently leaves them a time of 90, while the +// default time is 200. I'm not sure whether this is for balancing reasons +// or just an arbitrary difference. (jpeg) +void turn_corpse_into_skeleton(item_def &corpse, int time) +{ + ASSERT(corpse.base_type == OBJ_CORPSES && corpse.sub_type == CORPSE_BODY); + + // Some monsters' corpses lack the structure to leave skeletons behind. + if (!mons_skeleton( corpse.plus )) + return; + + // While it is possible to distinguish draconian corpses by colour, their + // skeletons are indistinguishable. + if (mons_genus(corpse.plus) == MONS_DRACONIAN + && corpse.plus != MONS_DRACONIAN) + { + corpse.plus = MONS_DRACONIAN; + } + + corpse.sub_type = CORPSE_SKELETON; + corpse.special = time; + corpse.colour = LIGHTGREY; +} + void turn_corpse_into_chunks( item_def &item ) { ASSERT( item.base_type == OBJ_CORPSES ); diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 7c919859f8..35446bd0fd 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -67,6 +67,7 @@ void trackers_init_new_level(bool transit); /* *********************************************************************** * called from: delay * *********************************************************************** */ +void turn_corpse_into_skeleton(item_def &corpse, int time = 200); void turn_corpse_into_chunks( item_def &item ); void init_stack_blood_potions( item_def &stack, int age = -1 ); diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index a325d0c0de..381491fae1 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -2098,7 +2098,7 @@ int mons_shoals_rare(int mcls) case MONS_STONE_GIANT: case MONS_YAKTAUR_CAPTAIN: return 10; - + case MONS_OKLOB_PLANT: return 5; default: @@ -2706,8 +2706,6 @@ int mons_standard_rare(int mcls) { switch (mcls) { -// "another lava thing" has no stats! (GDL) -// case MONS_ANOTHER_LAVA_THING: case MONS_MERFOLK: case MONS_MERMAID: case MONS_BIG_FISH: diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 1d1fed8710..b66c4cad13 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -1142,10 +1142,10 @@ bool mons_skeleton(int mc) if (mons_zombie_size(mc) == Z_NOZOMBIE || mons_weight(mc) == 0 || (mons_class_flag(mc, M_NO_SKELETON))) { - return false; + return (false); } - return true; + return (true); } // end mons_skeleton() flight_type mons_class_flies(int mc) @@ -1170,8 +1170,8 @@ flight_type mons_flies(const monsters *mon) const int type = mons_is_zombified(mon)? mons_zombie_base(mon) : mon->type; const flight_type ret = mons_class_flies( type ); return (ret ? ret - : (_scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0) ? FL_LEVITATE - : FL_NONE); + : (_scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0) ? FL_LEVITATE + : FL_NONE); } bool mons_amphibious(int mc) @@ -1733,13 +1733,20 @@ static std::string _str_monam(const monsters& mon, description_level_type desc, // Add suffixes. switch (mon.type) { - case MONS_ZOMBIE_SMALL: case MONS_ZOMBIE_LARGE: - result += " zombie"; break; - case MONS_SKELETON_SMALL: case MONS_SKELETON_LARGE: - result += " skeleton"; break; - case MONS_SIMULACRUM_SMALL: case MONS_SIMULACRUM_LARGE: - result += " simulacrum"; break; - default: break; + case MONS_ZOMBIE_SMALL: + case MONS_ZOMBIE_LARGE: + result += " zombie"; + break; + case MONS_SKELETON_SMALL: + case MONS_SKELETON_LARGE: + result += " skeleton"; + break; + case MONS_SIMULACRUM_SMALL: + case MONS_SIMULACRUM_LARGE: + result += " simulacrum"; + break; + default: + break; } // Vowel fix: Change 'a orc' to 'an orc' @@ -1864,8 +1871,8 @@ habitat_type mons_habitat_by_type(int mc) habitat_type mons_habitat(const monsters *m) { - return mons_habitat_by_type( - mons_is_zombified(m)? mons_zombie_base(m) : m->type ); + return mons_habitat_by_type( mons_is_zombified(m) ? mons_zombie_base(m) + : m->type ); } bool intelligent_ally(const monsters *monster) @@ -2534,6 +2541,7 @@ bool monster_shover(const monsters *m) return (false); int mchar = me->showchar; + // Somewhat arbitrary: giants and dragons are too big to get past anything, // beetles are too dumb (arguable), dancing weapons can't communicate, eyes // aren't pushers and shovers, zombies are zombies. Worms and elementals @@ -6476,8 +6484,10 @@ mon_body_shape get_mon_shape(const int type) if (type == MONS_SKELETAL_WARRIOR) return(MON_SHAPE_HUMANOID); else + { // constructed type, not enough info to determine shape return(MON_SHAPE_MISC); + } case 'A': // angelic beings return(MON_SHAPE_HUMANOID_WINGED); case 'B': // beetles diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 215d41e16b..70f28e54fa 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -264,11 +264,11 @@ monster_type pick_random_monster(const level_id &place, if (lev_mons || _need_moderate_ood(lev_mons)) lev_mons = _fuzz_mons_level(lev_mons); - // potentially nasty surprise, but very rare + // Potentially nasty surprise, but very rare. if (_need_super_ood(lev_mons)) lev_mons += random2(12); - // slightly out of depth monsters are more common: + // Slightly out of depth monsters are more common: // [ds] Replaced with a fuzz above for a more varied mix. //if (need_moderate_ood(lev_mons)) // lev_mons += random2(5); @@ -375,10 +375,12 @@ static monster_type resolve_monster_type(monster_type mon_type, { // Pick any random drac, constrained by colour if requested. do + { mon_type = static_cast<monster_type>( random_range(MONS_BLACK_DRACONIAN, MONS_DRACONIAN_SCORCHER)); + } while (base_type != MONS_PROGRAM_BUG && mon_type != base_type && (mons_species(mon_type) == mon_type @@ -719,21 +721,21 @@ static int _place_monster_aux( const mgen_data &mg, grid_wanted = habitat2grid( mons_habitat_by_type(mg.cls) ); int i = 0; - // we'll try 1000 times for a good spot + // We'll try 1000 times for a good spot. for ( ; i < 1000; i++) { fpos = mg.pos + coord_def( random_range(-3, 3), random_range(-3, 3) ); - // occupied? + // Occupied? if (mgrd(fpos) != NON_MONSTER || fpos == you.pos()) continue; if (!grid_compatible(grid_wanted, grd(fpos), true)) continue; - // don't generate monsters on top of teleport traps - // (how do they get there?) + // Don't generate monsters on top of teleport traps. + // (How do they get there?) int trap = trap_at_xy(fpos.x, fpos.y); if (trap >= 0 && !can_place_on_trap(mg.cls, env.trap[trap].type)) continue; @@ -747,7 +749,7 @@ static int _place_monster_aux( const mgen_data &mg, return (-1); } - // now, actually create the monster (wheeee!) + // Now, actually create the monster. (Wheeee!) menv[id].type = mg.cls; menv[id].base_monster = mg.base_type; @@ -756,10 +758,10 @@ static int _place_monster_aux( const mgen_data &mg, menv[id].x = fpos.x; menv[id].y = fpos.y; - // link monster into monster grid + // Link monster into monster grid. mgrd(fpos) = id; - // generate a brand shiny new monster, or zombie + // Generate a brand shiny new monster, or zombie. if (mons_class_is_zombified(mg.cls)) _define_zombie( id, mg.base_type, mg.cls, mg.power ); else @@ -895,14 +897,14 @@ static void _define_zombie( int mid, monster_type ztype, monster_type cs, int power ) { monster_type mons_sec2 = MONS_PROGRAM_BUG; - int zombie_size = 0; - bool ignore_rarity = false; - monster_type cls = MONS_PROGRAM_BUG; + int zombie_size = 0; + bool ignore_rarity = false; + monster_type cls = MONS_PROGRAM_BUG; if (power > 27) power = 27; - // set size based on zombie class (cs) + // Set size based on zombie class (cs). switch (cs) { case MONS_ZOMBIE_SMALL: @@ -922,26 +924,26 @@ static void _define_zombie( int mid, monster_type ztype, break; default: - // this should NEVER happen. + // This should NEVER happen. perror("\ncreate_zombie() got passed incorrect zombie type!\n"); end(0); break; } - // that is, random creature from which to fashion undead + // That is, random creature from which to fashion undead. if (ztype == MONS_PROGRAM_BUG) { - // how OOD this zombie can be. + // How OOD this zombie can be. int relax = 5; - // pick an appropriate creature to make a zombie out of, + // Pick an appropriate creature to make a zombie out of, // levelwise. The old code was generating absolutely // incredible OOD zombies. while (true) { cls = _pick_random_zombie(); - // on certain branches, zombie creation will fail if we use + // On certain branches, zombie creation will fail if we use // the mons_rarity() functions, because (for example) there // are NO zombifiable "native" abyss creatures. Other branches // where this is a problem are hell levels and the crypt. @@ -962,28 +964,37 @@ static void _define_zombie( int mid, monster_type ztype, ignore_rarity = true; } - // don't make out-of-rarity zombies when we don't have to + // Don't make out-of-rarity zombies when we don't have to. if (!ignore_rarity && mons_rarity(cls) == 0) continue; - // if skeleton, monster must have a skeleton + // If skeleton, monster must have a skeleton. if ((cs == MONS_SKELETON_SMALL || cs == MONS_SKELETON_LARGE) && !mons_skeleton(cls)) { continue; } - // size must match, but you can make a spectral thing out + // Size must match, but you can make a spectral thing out // of anything. if (mons_zombie_size(cls) != zombie_size && zombie_size != -1) continue; - // hack -- non-dungeon zombies are always made out of nastier - // monsters + // Skeletal or icy draconians shouldn't be coloured. + // How could you tell? + if ((cs == MONS_SKELETON_SMALL || cs == MONS_SIMULACRUM_SMALL) + && mons_genus(cls) == MONS_DRACONIAN + && cls != MONS_DRACONIAN) + { + cls = MONS_DRACONIAN; + } + + // Hack -- non-dungeon zombies are always made out of nastier + // monsters. if (you.level_type != LEVEL_DUNGEON && mons_power(cls) > 8) break; - // check for rarity.. and OOD - identical to mons_place() + // Check for rarity.. and OOD - identical to mons_place() int level, diff, chance; level = mons_level( cls ) - 4; @@ -998,7 +1009,7 @@ static void _define_zombie( int mid, monster_type ztype, break; } - // every so often, we'll relax the OOD restrictions. Avoids + // Every so often, we'll relax the OOD restrictions. Avoids // infinite loops (if we don't do this, things like creating // a large skeleton on level 1 may hang the game!) if (one_chance_in(5)) @@ -1873,10 +1884,8 @@ public: } }; -/* - * Finds a square for a monster of the given class, pathfinding - * through only contiguous squares of habitable terrain. - */ +// Finds a square for a monster of the given class, pathfinding +// through only contiguous squares of habitable terrain. coord_def find_newmons_square_contiguous(monster_type mons_class, const coord_def &start, int distance) @@ -1921,8 +1930,7 @@ bool player_angers_monster(monsters *mon, bool actual) const bool antimagical = (you.religion == GOD_TROG && mons_is_magic_user(mon)); - // get the drawbacks, not the benefits... - // (to prevent e.g. demon-scumming) + // Get the drawbacks, not the benefits... (to prevent e.g. demon-scumming). if (holy || unholy || antimagical) { if (actual @@ -1985,14 +1993,13 @@ bool empty_surrounds(int emx, int emy, dungeon_feature_type spc_wanted, FixedVector < char, 2 > &empty) { bool success; - // assume all player summoning originates from player x,y + // Assume all player summoning originates from player x,y. bool playerSummon = (emx == you.x_pos && emy == you.y_pos); int good_count = 0; int count_x, count_y; for (count_x = -radius; count_x <= radius; count_x++) - { for (count_y = -radius; count_y <= radius; count_y++) { success = false; @@ -2025,15 +2032,14 @@ bool empty_surrounds(int emx, int emy, dungeon_feature_type spc_wanted, if (success && one_chance_in(++good_count)) { - // add point to list of good points + // Add point to list of good points. empty[0] = tx; empty[1] = ty; } - } // end "for count_y" - } // end "for count_x" + } return (good_count > 0); -} // end empty_surrounds() +} monster_type summon_any_demon(demon_class_type demon_class) { diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 8f2ea5897e..2e9b77c446 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1322,14 +1322,18 @@ _print_next_monster_desc(const std::vector<monster_pane_info>& mons, int& start) { int printed = 0; - // one glyph for each monster + // One glyph for each monster. for (unsigned int i_mon=start; i_mon<end; i_mon++) { unsigned int glyph; unsigned short glyph_color; get_mons_glyph(mons[i_mon].m_mon, &glyph, &glyph_color); textcolor(glyph_color); - cprintf( stringize_glyph(glyph).c_str() ); + // XXX: Hack to make the death cob (%) show up correctly. + if (glyph == '%') + cprintf("%%"); + else + cprintf( stringize_glyph(glyph).c_str() ); ++ printed; // Printing too many looks pretty bad, though. if (i_mon > 6) @@ -1349,11 +1353,12 @@ _print_next_monster_desc(const std::vector<monster_pane_info>& mons, int& start) mons_get_damage_level(mon, damage_desc, damage_level); else damage_level = MDAM_OKAY; + int dam_color; switch (damage_level) { - // NOTE: in os x, light versions of foreground colors are OK, - // but not background colors. So stick wth standards. + // NOTE: In os x, light versions of foreground colors are OK, + // but not background colors. So stick wth standards. case MDAM_DEAD: case MDAM_ALMOST_DEAD: case MDAM_SEVERELY_DAMAGED: dam_color = RED; break; diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 7c163f1d73..0b5006464c 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -293,11 +293,7 @@ int corpse_rot(int power) if (!mons_skeleton(mitm[objl].plus)) destroy_item(objl); else - { - mitm[objl].sub_type = CORPSE_SKELETON; - mitm[objl].special = 200; - mitm[objl].colour = LIGHTGREY; - } + turn_corpse_into_skeleton(mitm[objl]); place_cloud(CLOUD_MIASMA, adx, ady, 4 + random2avg(16, 3), KC_YOU); @@ -314,7 +310,7 @@ int corpse_rot(int power) if (player_can_smell()) mpr("You smell decay."); - // should make zombies decay into skeletons + // Should make zombies decay into skeletons? return 0; } // end corpse_rot() @@ -407,8 +403,9 @@ int animate_a_corpse( int axps, int ayps, beh_type corps_beh, int corps_hit, while (objl != NON_ITEM) { const item_def& item = mitm[objl]; - if (is_animatable_corpse(item) && - (class_allowed == CORPSE_BODY || item.sub_type == CORPSE_SKELETON)) + if (is_animatable_corpse(item) + && (class_allowed == CORPSE_BODY + || item.sub_type == CORPSE_SKELETON)) { bool was_butchering = is_being_butchered(item); diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 77393b1c8c..845701cf45 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1323,11 +1323,7 @@ static int make_a_rot_cloud(int x, int y, int pow, cloud_type ctype) if (!mons_skeleton(mitm[obj].plus)) destroy_item(obj); else - { - mitm[obj].sub_type = CORPSE_SKELETON; - mitm[obj].special = 200; - mitm[obj].colour = LIGHTGREY; - } + turn_corpse_into_skeleton(mitm[obj]); place_cloud(ctype, x, y, (3 + random2(pow / 4) + random2(pow / 4) + diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc index 43ff12e9ec..b59cb13cc1 100644 --- a/crawl-ref/source/tile1.cc +++ b/crawl-ref/source/tile1.cc @@ -1364,13 +1364,12 @@ static int _tileidx_food(const item_def &item) return TILE_ERROR; } -// returns index of corpse tiles -// parameter mon already holds the corpse type (monster species) +// Returns index of corpse tiles. +// Parameter mon already holds the corpse type (monster species). static int _tileidx_corpse(int mon) { switch (mon) { - // case MONS_PROGRAM_BUG: case MONS_GIANT_COCKROACH: return TILE_CORPSE_GIANT_COCKROACH; case MONS_GIANT_ANT: @@ -1429,15 +1428,12 @@ static int _tileidx_corpse(int mon) case MONS_DEEP_ELF_SORCERER: case MONS_DEEP_ELF_DEATH_MAGE: return TILE_CORPSE_ELF; - // case MONS_FUNGUS: - // case MONS_WANDERING_MUSHROOM: case MONS_GOBLIN: return TILE_CORPSE_GOBLIN; case MONS_HOBGOBLIN: return TILE_CORPSE_HOBGOBLIN; case MONS_GNOLL: return TILE_CORPSE_GNOLL; - // case MONS_BOGGART: case MONS_JACKAL: return TILE_CORPSE_JACKAL; case MONS_HOUND: @@ -1450,8 +1446,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_WAR_DOG; case MONS_HOG: return TILE_CORPSE_HOG; - // case MONS_HELL_HOUND: - // case MONS_HELL_HOG: case MONS_ELEPHANT_SLUG: return TILE_CORPSE_ELEPHANT_SLUG; case MONS_GIANT_SLUG: @@ -1490,7 +1484,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_NECROPHAGE; case MONS_GHOUL: return TILE_CORPSE_GHOUL; - // case MONS_ROTTING_HULK: case MONS_ORC: case MONS_ORC_WIZARD: case MONS_ORC_PRIEST: @@ -1500,11 +1493,6 @@ static int _tileidx_corpse(int mon) case MONS_ORC_SORCERER: case MONS_ORC_HIGH_PRIEST: return TILE_CORPSE_ORC; - // case MONS_PHANTOM: - // case MONS_HUNGRY_GHOST: - // case MONS_FLAYED_GHOST: - // case MONS_PLAYER_GHOST: - // case MONS_INSUBSTANTIAL_WISP: case MONS_RAT: return TILE_CORPSE_RAT; case MONS_QUOKKA: @@ -1531,12 +1519,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_UGLY_THING; case MONS_VERY_UGLY_THING: return TILE_CORPSE_VERY_UGLY_THING; - // case MONS_FIRE_VORTEX: - // case MONS_SPATIAL_VORTEX: - // case MONS_AIR_ELEMENTAL: - // case MONS_EARTH_ELEMENTAL: - // case MONS_FIRE_ELEMENTAL: - // case MONS_WATER_ELEMENTAL: case MONS_KILLER_BEE_LARVA: return TILE_CORPSE_KILLER_BEE_LARVA; case MONS_WORM: @@ -1547,8 +1529,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_BRAIN_WORM; case MONS_SPINY_WORM: return TILE_CORPSE_SPINY_WORM; - // case MONS_UNSEEN_HORROR: - // case MONS_ABOMINATION_SMALL: case MONS_YELLOW_WASP: return TILE_CORPSE_YELLOW_WASP; case MONS_GIANT_MOSQUITO: @@ -1557,16 +1537,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_GIANT_BLOWFLY; case MONS_RED_WASP: return TILE_CORPSE_RED_WASP; - // case MONS_MOTH_OF_WRATH: - // case MONS_ZOMBIE_SMALL: - // case MONS_SKELETON_SMALL: - // case MONS_SIMULACRUM_SMALL: - // case MONS_SKELETAL_WARRIOR: - // case MONS_FLYING_SKULL: - // case MONS_CURSE_SKULL: - // case MONS_CURSE_TOE: - // case MONS_ANGEL: - // case MONS_DAEVA: case MONS_GIANT_BEETLE: return TILE_CORPSE_GIANT_BEETLE; case MONS_BOULDER_BEETLE: @@ -1601,17 +1571,12 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_SWAMP_DRAGON; case MONS_MOTTLED_DRAGON: return TILE_CORPSE_MOTTLED_DRAGON; - // case MONS_QUICKSILVER_DRAGON: - // case MONS_IRON_DRAGON: case MONS_STORM_DRAGON: return TILE_CORPSE_STORM_DRAGON; case MONS_GOLDEN_DRAGON: return TILE_CORPSE_GOLDEN_DRAGON; case MONS_SHADOW_DRAGON: return TILE_CORPSE_SHADOW_DRAGON; - // case MONS_SKELETAL_DRAGON: - // case MONS_SERPENT_OF_HELL: - // case MONS_EFREET: case MONS_GIANT_FROG: return TILE_CORPSE_GIANT_FROG; case MONS_GIANT_BROWN_FROG: @@ -1620,7 +1585,6 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_SPINY_FROG; case MONS_BLINK_FROG: return TILE_CORPSE_BLINK_FROG; - // case MONS_GIANT_SPORE: case MONS_GIANT_EYEBALL: return TILE_CORPSE_GIANT_EYEBALL; case MONS_EYE_OF_DRAINING: @@ -1629,39 +1593,20 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_GIANT_ORANGE_BRAIN; case MONS_GREAT_ORB_OF_EYES: return TILE_CORPSE_GREAT_ORB_OF_EYES; - // case MONS_SHINING_EYE: - // case MONS_EYE_OF_DEVASTATION: case MONS_HIPPOGRIFF: return TILE_CORPSE_HIPPOGRIFF; case MONS_MANTICORE: return TILE_CORPSE_MANTICORE; case MONS_GRIFFON: return TILE_CORPSE_GRIFFON; - // case MONS_SPHINX: - // case MONS_ICE_BEAST: - // case MONS_OOZE: - // case MONS_JELLY: - // case MONS_SLIME_CREATURE: - // case MONS_PULSATING_LUMP: case MONS_GIANT_AMOEBA: return TILE_CORPSE_GIANT_AMOEBA; - // case MONS_BROWN_OOZE: - // case MONS_AZURE_JELLY: - // case MONS_DEATH_OOZE: - // case MONS_ACID_BLOB: - // case MONS_ROYAL_JELLY: case MONS_KOBOLD: return TILE_CORPSE_KOBOLD; case MONS_BIG_KOBOLD: return TILE_CORPSE_BIG_KOBOLD; case MONS_KOBOLD_DEMONOLOGIST: return TILE_CORPSE_KOBOLD; - // case MONS_LICH: - // case MONS_ANCIENT_LICH: - // case MONS_MUMMY: - // case MONS_GUARDIAN_MUMMY: - // case MONS_GREATER_MUMMY: - // case MONS_MUMMY_PRIEST: case MONS_NAGA: case MONS_GUARDIAN_NAGA: case MONS_NAGA_MAGE: @@ -1672,15 +1617,10 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_OGRE; case MONS_TWO_HEADED_OGRE: return TILE_CORPSE_TWO_HEADED_OGRE; - // case MONS_OGRE_MAGE: - // case MONS_PLANT: - // case MONS_OKLOB_PLANT: case MONS_QUEEN_BEE: return TILE_CORPSE_QUEEN_BEE; case MONS_QUEEN_ANT: return TILE_CORPSE_QUEEN_ANT; - // case MONS_RAKSHASA: - // case MONS_RAKSHASA_FAKE: case MONS_SMALL_SNAKE: return TILE_CORPSE_SMALL_SNAKE; case MONS_SNAKE: @@ -1709,154 +1649,23 @@ static int _tileidx_corpse(int mon) return TILE_CORPSE_POLAR_BEAR; case MONS_BLACK_BEAR: return TILE_CORPSE_BLACK_BEAR; - // case MONS_VAMPIRE: - // case MONS_VAMPIRE_KNIGHT: - // case MONS_VAMPIRE_MAGE: - // case MONS_WIGHT: - // case MONS_WRAITH: - // case MONS_SHADOW_WRAITH: - // case MONS_FREEZING_WRAITH: - // case MONS_SPECTRAL_WARRIOR: - // case MONS_SPECTRAL_THING: - // case MONS_ABOMINATION_LARGE: - // case MONS_TENTACLED_MONSTROSITY: - // case MONS_ORB_GUARDIAN: case MONS_SHEEP: return TILE_CORPSE_SHEEP; case MONS_YAK: return TILE_CORPSE_YAK; case MONS_DEATH_YAK: return TILE_CORPSE_DEATH_YAK; - // case MONS_ZOMBIE_LARGE: - // case MONS_SKELETON_LARGE: - // case MONS_SIMULACRUM_LARGE: - // case MONS_BIG_FISH: - // case MONS_GIANT_GOLDFISH: - // case MONS_ELECTRICAL_EEL: - // case MONS_JELLYFISH: - // case MONS_SWAMP_WORM: - // case MONS_LAVA_WORM: - // case MONS_LAVA_FISH: - // case MONS_LAVA_SNAKE: - // case MONS_SALAMANDER: - // case MONS_ROCK_WORM: case MONS_HUMAN: case MONS_HELL_KNIGHT: case MONS_NECROMANCER: case MONS_WIZARD: return TILE_CORPSE_HUMAN; - // case MONS_VAULT_GUARD: case MONS_SHAPESHIFTER: return TILE_CORPSE_SHAPESHIFTER; case MONS_GLOWING_SHAPESHIFTER: return TILE_CORPSE_GLOWING_SHAPESHIFTER; - // case MONS_KILLER_KLOWN: - // case MONS_GOLD_MIMIC: - // case MONS_WEAPON_MIMIC: - // case MONS_ARMOUR_MIMIC: - // case MONS_SCROLL_MIMIC: - // case MONS_POTION_MIMIC: - // case MONS_DANCING_WEAPON: - // case MONS_IMP: - // case MONS_QUASIT: - // case MONS_WHITE_IMP: - // case MONS_LEMURE: - // case MONS_UFETUBUS: - // case MONS_MANES: - // case MONS_MIDGE: - // case MONS_SHADOW_IMP: - // case MONS_RED_DEVIL: - // case MONS_ROTTING_DEVIL: - // case MONS_HAIRY_DEVIL: - // case MONS_BEAST: - // case MONS_SMOKE_DEMON: - // case MONS_HELLION: - // case MONS_TORMENTOR: - // case MONS_BLUE_DEVIL: - // case MONS_IRON_DEVIL: - // case MONS_NEQOXEC: - // case MONS_ORANGE_DEMON: - // case MONS_HELLWING: - // case MONS_YNOXINUL: - // case MONS_DEMONIC_CRAWLER: - // case MONS_SHADOW_DEMON: - // case MONS_SUN_DEMON: - // case MONS_REAPER: - // case MONS_SOUL_EATER: - // case MONS_ICE_DEVIL: - // case MONS_LOROCYPROCA: - // case MONS_FIEND: - // case MONS_ICE_FIEND: - // case MONS_SHADOW_FIEND: - // case MONS_PIT_FIEND: - // case MONS_EXECUTIONER: - // case MONS_GREEN_DEATH: - // case MONS_BLUE_DEATH: - // case MONS_BALRUG: - // case MONS_CACODEMON: - // case MONS_CLAY_GOLEM: - // case MONS_WOOD_GOLEM: - // case MONS_STONE_GOLEM: - // case MONS_IRON_GOLEM: - // case MONS_CRYSTAL_GOLEM: - // case MONS_TOENAIL_GOLEM: - // case MONS_ELECTRIC_GOLEM: - // case MONS_ICE_STATUE: - // case MONS_SILVER_STATUE: - // case MONS_ORANGE_STATUE: - // case MONS_GARGOYLE: - // case MONS_METAL_GARGOYLE: - // case MONS_MOLTEN_GARGOYLE: - // case MONS_PANDEMONIUM_DEMON: - // case MONS_BALL_LIGHTNING: - // case MONS_ORB_OF_FIRE: - // case MONS_VAPOUR: - // case MONS_SHADOW: - // case MONS_DEATH_COB: - // case MONS_IJYB: - // case MONS_BLORK_THE_ORC: - // case MONS_URUG: - // case MONS_EROLCHA: - // case MONS_SNORG: case MONS_POLYPHEMUS: return TILE_CORPSE_CYCLOPS; - // case MONS_ANTAEUS: - // case MONS_XTAHUA: - // case MONS_TIAMAT: - // case MONS_BORIS: - // case MONS_MURRAY: - // case MONS_TERENCE: - // case MONS_JESSICA: - // case MONS_SIGMUND: - // case MONS_EDMUND: - // case MONS_PSYCHE: - // case MONS_DONALD: - // case MONS_MICHAEL: - // case MONS_JOSEPH: - // case MONS_ERICA: - // case MONS_JOSEPHINE: - // case MONS_HAROLD: - // case MONS_NORBERT: - // case MONS_JOZEF: - // case MONS_AGNES: - // case MONS_MAUD: - // case MONS_LOUISE: - // case MONS_FRANCIS: - // case MONS_FRANCES: - // case MONS_RUPERT: - // case MONS_WAYNE: - // case MONS_DUANE: - // case MONS_NORRIS: - // case MONS_FREDERICK: - // case MONS_MARGERY: - // case MONS_MNOLEG: - // case MONS_LOM_LOBON: - // case MONS_CEREBOV: - // case MONS_GLOORX_VLOQ: - // case MONS_GERYON: - // case MONS_DISPATER: - // case MONS_ASMODEUS: - // case MONS_ERESHKIGAL: default: return TILE_ERROR; } |