diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-31 14:19:08 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-31 14:19:08 +0000 |
commit | 5a961b08ca420012d9bdb3b0ef2d184fd5d2816d (patch) | |
tree | 631ec91f7ba23b0d89e0ab6ecbe2c64ebbc8719e /crawl-ref | |
parent | 8f1be2e5a8ba70f6814a370e9297fbd6321d6aa2 (diff) | |
download | crawl-ref-5a961b08ca420012d9bdb3b0ef2d184fd5d2816d.tar.gz crawl-ref-5a961b08ca420012d9bdb3b0ef2d184fd5d2816d.zip |
Nagas no longer get racial weapons [1811726].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2708 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/enum.h | 6 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/item_use.h | 8 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 7 |
4 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 6ede219e63..eb4859627b 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1078,12 +1078,6 @@ enum enchant_retval ERV_INCREASED }; -enum enchant_stat_type -{ - ENCHANT_TO_HIT, - ENCHANT_TO_DAM -}; - enum equipment_type { EQ_NONE = -1, diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 8c3b8b7f81..b51767562d 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3351,7 +3351,7 @@ static bool affix_weapon_enchantment() return (success); } -bool enchant_weapon( int which_stat, bool quiet ) +bool enchant_weapon( enchant_stat_type which_stat, bool quiet ) { const int wpn = you.equip[ EQ_WEAPON ]; bool affected = true; @@ -3846,7 +3846,6 @@ void read_scroll(void) case SCR_ENCHANT_WEAPON_III: if (you.equip[ EQ_WEAPON ] != -1) { - // Successfully affixing the enchantment will print // its own message. if (!affix_weapon_enchantment()) diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index a529e283f1..6a4c4bc41d 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -20,6 +20,12 @@ #include "externs.h" #include "enum.h" +enum enchant_stat_type +{ + ENCHANT_TO_HIT, + ENCHANT_TO_DAM +}; + enum fire_type { FIRE_NONE = 0x0000, @@ -156,7 +162,7 @@ void use_randart(item_def &item); bool puton_item(int slot, bool prompt_finger = true); -bool enchant_weapon( int which_stat, bool quiet = false ); +bool enchant_weapon( enchant_stat_type which_stat, bool quiet = false ); bool throw_it(bolt &pbolt, int throw_2, bool teleport=false, int acc_bonus=0, dist *target = NULL); diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index f304ef4091..c88ef67c7a 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -3303,7 +3303,6 @@ static item_make_species_type give_weapon(monsters *mon, int level, case MONS_TIAMAT: { item.base_type = OBJ_WEAPONS; - const int temp_rand = random2(120); item.sub_type = ((temp_rand > 109) ? WPN_LONG_SWORD : // 8.33% (temp_rand > 99) ? WPN_SHORT_SWORD : // 8.33% @@ -3671,6 +3670,10 @@ static item_make_species_type give_weapon(monsters *mon, int level, break; } } // end "switch(mon->type)" + + // Nagas don't get racial stuff. + if (mons_genus(mon->type) == MONS_NAGA) + item_race = MAKE_ITEM_NO_RACE; // only happens if something in above switch doesn't set it {dlb} if (item.base_type == OBJ_UNASSIGNED) @@ -4023,7 +4026,7 @@ void give_armour(monsters *mon, int level) default: return; - } // end of switch(menv [mid].type) + } const object_class_type xitc = mitm[bp].base_type; const int xitt = mitm[bp].sub_type; |