summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 21:17:47 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-20 21:17:47 +0000
commit55ac5bbc1fc165f7bd82ac9136283a416027119a (patch)
tree655527c92c0e3fc7e5e258a2f01c2d47d16a0167 /crawl-ref/source
parent54d8ea2eb8b8836a6ec8e8a7eb29549c9df80fb9 (diff)
downloadcrawl-ref-55ac5bbc1fc165f7bd82ac9136283a416027119a.tar.gz
crawl-ref-55ac5bbc1fc165f7bd82ac9136283a416027119a.zip
Another one of those mixed commits.
* Fix 1915277: Blade Hands time-out removing bardings. * Ely's Lesser Healing costs range(0,1) piety (avg. 0.5) * Allow synonym for "yes" in yesnoquit(), and use it for eating (e=y). Also, in preparation for 0.4 (yes, I can't wait) finally disallow random generation of weapons of orc slaying. Demon lords use a check of their own and as a randart property it's also allowed, which I think is fine. Allow random generation of nets and increase shop prices for nets and javelins. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3766 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/abl-show.cc4
-rw-r--r--crawl-ref/source/food.cc2
-rw-r--r--crawl-ref/source/makeitem.cc27
-rw-r--r--crawl-ref/source/randart.cc3
-rw-r--r--crawl-ref/source/shopping.cc9
-rw-r--r--crawl-ref/source/stuff.cc5
-rw-r--r--crawl-ref/source/stuff.h4
-rw-r--r--crawl-ref/source/transfor.cc6
8 files changed, 33 insertions, 27 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index c3fa783a24..9622641c4b 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -279,8 +279,8 @@ static const ability_def Ability_List[] =
// Elyvilon
{ ABIL_ELYVILON_DESTROY_WEAPONS, "Destroy Weapons", 0, 0, 0, 0, ABFLAG_NONE },
- { ABIL_ELYVILON_LESSER_HEALING, "Lesser Healing", 1, 0, 100, 0,
- ABFLAG_CONF_OK },
+ { ABIL_ELYVILON_LESSER_HEALING, "Lesser Healing",
+ 1, 0, 100, generic_cost::range(0, 1), ABFLAG_CONF_OK },
{ ABIL_ELYVILON_PURIFICATION, "Purification", 2, 0, 150, 1,
ABFLAG_CONF_OK },
{ ABIL_ELYVILON_HEALING, "Healing", 2, 0, 250, 2, ABFLAG_CONF_OK },
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 7180bcc3a6..d65224bc52 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -863,7 +863,7 @@ int eat_from_floor()
prompt << (you.species == SP_VAMPIRE ? "Drink blood from" : "Eat")
<< ' ' << ((item.quantity > 1) ? "one of " : "")
<< item.name(DESC_NOCAP_A) << '?';
- const int ans = yesnoquit( prompt.str().c_str(), true, 0, false );
+ const int ans = yesnoquit( prompt.str().c_str(), true, 0, false, 'E' );
if ( ans == -1 ) // quit
return -1;
else if ( ans == 1 )
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 5f6178d173..c4fd26ec6e 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1248,9 +1248,6 @@ static brand_type determine_weapon_brand(const item_def& item, int item_level)
if (one_chance_in(8))
rc = SPWPN_PROTECTION;
- if (one_chance_in(10))
- rc = SPWPN_ORC_SLAYING;
-
if (one_chance_in(8))
rc = coinflip() ? SPWPN_FLAMING : SPWPN_FREEZING;
@@ -1294,9 +1291,6 @@ static brand_type determine_weapon_brand(const item_def& item, int item_level)
if (one_chance_in(7))
rc = SPWPN_PROTECTION;
- if (one_chance_in(8))
- rc = SPWPN_ORC_SLAYING;
-
if (one_chance_in(12))
rc = SPWPN_DRAINING;
@@ -1340,9 +1334,6 @@ static brand_type determine_weapon_brand(const item_def& item, int item_level)
rc = SPWPN_VORPAL;
}
- if (one_chance_in(6))
- rc = SPWPN_ORC_SLAYING;
-
if (one_chance_in(4))
rc = coinflip() ? SPWPN_FLAMING : SPWPN_FREEZING;
@@ -1405,9 +1396,6 @@ static brand_type determine_weapon_brand(const item_def& item, int item_level)
rc = SPWPN_VORPAL;
if (one_chance_in(6))
- rc = SPWPN_ORC_SLAYING;
-
- if (one_chance_in(6))
rc = coinflip() ? SPWPN_FLAMING : SPWPN_FREEZING;
if (one_chance_in(6))
@@ -1752,6 +1740,7 @@ static void generate_missile_item(item_def& item, int force_type,
10, MI_NEEDLE,
5, MI_SLING_BULLET,
2, MI_JAVELIN,
+ 1, MI_THROWING_NET,
0);
// no fancy rocks -- break out before we get to racial/special stuff
@@ -1762,10 +1751,16 @@ static void generate_missile_item(item_def& item, int force_type,
}
else if (item.sub_type == MI_STONE)
{
- item.quantity = 1+random2(9) + random2(12) + random2(15) + random2(12);
+ item.quantity = 1+ random2(9) + random2(12) + random2(15) + random2(12);
+ return;
+ }
+ else if (item.sub_type == MI_THROWING_NET) // no fancy nets, either
+ {
+ item.quantity = 1 + one_chance_in(4); // and only one, rarely two
return;
}
+
set_equip_race(item, determine_missile_race(item, item_race));
if (!no_brand)
set_item_ego_type( item, OBJ_MISSILES,
@@ -1779,9 +1774,9 @@ static void generate_missile_item(item_def& item, int force_type,
item.quantity = random_range(2, 8);
}
else if (get_ammo_brand( item ) != SPMSL_NORMAL)
- item.quantity = 1+random2(9) + random2(12) + random2(12);
+ item.quantity = 1 + random2(9) + random2(12) + random2(12);
else
- item.quantity = 1+random2(9) + random2(12) + random2(12) + random2(15);
+ item.quantity = 1+ random2(9) + random2(12) + random2(12) + random2(15);
if (10 + item_level >= random2(100))
item.plus += random2(5);
@@ -2772,7 +2767,7 @@ int items( int allow_uniques, // not just true-false,
default:
item.base_type = OBJ_GOLD;
if (force_good)
- item.quantity = 150+random2(150) + random2(random2(random2(2000)));
+ item.quantity = 150+ random2(150) + random2(random2(random2(2000)));
else
item.quantity = 1 + random2avg(19, 2) + random2(item_level);
break;
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index 71c9f96a11..6c3b325bc8 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1704,5 +1704,6 @@ const char *unrandart_descrip( int which_descrip, const item_def &item )
return ((which_descrip == 0) ? unrand->spec_descrip1 :
(which_descrip == 1) ? unrand->spec_descrip2 :
- (which_descrip == 2) ? unrand->spec_descrip3 : "Unknown.");
+ (which_descrip == 2) ? unrand->spec_descrip3
+ : "Unknown.");
}
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index f12c308f98..1fab34bb59 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -802,10 +802,15 @@ unsigned int item_value( item_def item, bool ident )
case MI_NEEDLE:
valued += 2;
break;
+ case MI_JAVELIN:
+ valued += 8;
+ break;
+ case MI_THROWING_NET:
+ valued += 30;
+ break;
default:
- // was: cases 6 through 16 with empty strcat()'s 15jan2000 {dlb}
valued += 5;
- break; //strcat(glog , ""); break;
+ break;
}
break;
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 32ad0011f7..2dfcc061da 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -830,7 +830,8 @@ bool yesno( const char *str, bool safe, int safeanswer, bool clear_after,
} // end yesno()
// like yesno(), but returns 0 for no, 1 for yes, and -1 for quit
-int yesnoquit( const char* str, bool safe, int safeanswer, bool clear_after )
+int yesnoquit( const char* str, bool safe, int safeanswer,
+ bool clear_after, char alt_yes )
{
if (!crawl_state.is_repeating_cmd())
interrupt_activity( AI_FORCE_INTERRUPT );
@@ -862,7 +863,7 @@ int yesnoquit( const char* str, bool safe, int safeanswer, bool clear_after )
if (tmp == 'N')
return 0;
- else if (tmp == 'Y')
+ else if (tmp == 'Y' || tmp == alt_yes)
return 1;
else
mpr("[Y]es, [N]o or [Q]uit only, please.");
diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h
index 7517b589cd..1f59ed45b0 100644
--- a/crawl-ref/source/stuff.h
+++ b/crawl-ref/source/stuff.h
@@ -77,8 +77,8 @@ bool yesno( const char * str, bool safe = true, int safeanswer = 0,
bool noprompt = false,
const explicit_keymap *map = NULL );
-int yesnoquit( const char* str, bool safe = true,
- int safeanswer = 0, bool clear_after = true );
+int yesnoquit( const char* str, bool safe = true, int safeanswer = 0,
+ bool clear_after = true, char alt_yes = 'Y' );
bool in_bounds( int x, int y );
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index 3bdb081fe8..3e28135e9d 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -588,8 +588,12 @@ void untransform(void)
// Removed barding check, no transformed creatures can wear barding
// anyway.
- if (you.species == SP_NAGA || you.species == SP_CENTAUR)
+ // *coughs* Ahem, blade hands... -- jpeg
+ if ((you.species == SP_NAGA || you.species == SP_CENTAUR)
+ && you.inv[you.equip[EQ_BOOTS]].sub_type == ARM_BOOTS)
+ {
remove_one_equip(EQ_BOOTS);
+ }
if (hp_downscale != 10 && you.hp != you.hp_max)
{