summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-04 22:16:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-04 22:16:09 +0000
commita6607672ebf7688fa06f3e1a1b24959c72a2e905 (patch)
tree5bf934b9b13e7b257b0624ed160ea9aae84e0022
parent54374f6bcc0dd6e456823fc74e31a1b63a49d86e (diff)
downloadcrawl-ref-a6607672ebf7688fa06f3e1a1b24959c72a2e905.tar.gz
crawl-ref-a6607672ebf7688fa06f3e1a1b24959c72a2e905.zip
Apply my previous commit to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10097 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup2
-rw-r--r--crawl-ref/docs/crawl_manual.txt16
-rw-r--r--crawl-ref/source/beam.cc3
-rw-r--r--crawl-ref/source/effects.cc7
-rw-r--r--crawl-ref/source/food.cc17
-rw-r--r--crawl-ref/source/item_use.cc18
-rw-r--r--crawl-ref/source/mutation.cc12
-rw-r--r--crawl-ref/source/spells4.cc10
-rw-r--r--crawl-ref/source/spl-cast.cc2
-rw-r--r--crawl-ref/source/spl-util.cc5
10 files changed, 64 insertions, 28 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index ff7f75be46..3296f1f32a 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -11,7 +11,7 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes.
* Fixed Xom's repel stairs effect moving shops.
* Really allow uniques to retain their spells when polymorphed.
* Artificers start with 1 MP.
-* Tiles: Re-allow selection of player dolls.
+* Tiles: Re-allow selection of player dolls ('-' command).
* Add missing tiles options to the options guide (docs/, '?&' command).
Stone Soup 0.5.0 (20090612)
diff --git a/crawl-ref/docs/crawl_manual.txt b/crawl-ref/docs/crawl_manual.txt
index 5e8c603fb5..b76f5c56ee 100644
--- a/crawl-ref/docs/crawl_manual.txt
+++ b/crawl-ref/docs/crawl_manual.txt
@@ -946,7 +946,7 @@ character of these species might find a Centaur or Naga barding.
Artefacts
---------
Weapons, armour, jewellery and spellbooks can be artefacts. These come
-in two flavours: predefined artefacts ('fixedarts'), and randomly
+in two flavours: predefined artefacts ('fixedarts'), and randomly
created ones ('randarts'). Artefacts will always carry unusual names,
for example "golden sword" or "shimmering scale mail". Also, artefacts
cannot be modified in any way, including enchantments.
@@ -2426,9 +2426,9 @@ Other game-playing commands:
a Use special ability.
p Pray (or renew an existing prayer).
z Cast a spell. Should the spell demand monsters as
- target but there are none within range, casting
+ target but there are none within range, casting
will be stopped. In this case, neither turns nor
- magic are used. If you want to cast the spell
+ magic are used. If you want to cast the spell
nonetheless, use Z.
Z Cast a spell, regardless of range limitations.
I List spells.
@@ -2666,12 +2666,12 @@ Lev You levitate, i.e. hover a few inches above the ground.
Fly You fly, gaining the benefits of levitation with none of
the drawbacks. This is only accessible for experienced
Kenku, lucky Draconians, characters using Dragon form,
- or those levitating and wearing an amulet of controlled
+ or those levitating and wearing an amulet of controlled
flight. Flying provides a speed bonus to swiftness.
Held You are held in a net: you cannot move freely and
will instead only try to fight your way out of the net.
-Bhld You are beheld: you cannot move away from the monster(s)
- beholding you.
+Mesm You are mesmerised: you cannot move away from the monster(s)
+ mesmerising you.
Fire You are plagued with sticky fire. It will time out,
probably burning scrolls in the process. Drop the most
important ones!
@@ -2688,8 +2688,8 @@ DMsl You deflect missiles, i.e. there's a great chance to
evade them. Still, this protection is not bulletproof.
Rot This is a very harmful, necromantic ailment. You will
lose maximum hit points over time. Only healing potions
- and wands or and certain abilities restore these. The
- rotting itself is cured with potions of healing or by
+ and wands or and certain abilities restore these. The
+ rotting itself is cured with potions of healing or by
waiting it out.
Ins You are insulated, i.e. immune to electric shocks.
Touch Your hands are glowing, and any monster you touch might
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index c05e1bf18f..54ff5b1077 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2646,6 +2646,7 @@ bool poison_monster(monsters *monster, kill_category who, int levels,
old_pois.degree > 0 ? " looks even sicker."
: " is poisoned.");
}
+ behaviour_event(monster, ME_ANNOY, (who == KC_YOU) ? MHITYOU : MHITNOT);
}
// Finally, take care of deity preferences.
@@ -5040,10 +5041,8 @@ int bolt::range_used_on_hit(const actor* victim) const
return (used);
for (unsigned int i = 0; i < range_funcs.size(); ++i)
- {
if ( (*range_funcs[i])(*this, victim, used) )
break;
- }
return (used);
}
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index c1b5a4eaa9..65a5a12984 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -589,7 +589,7 @@ bool lose_stat(unsigned char which_stat, unsigned char stat_loss, bool force,
const char *cause, bool see_source)
{
bool statLowered = false; // must initialize to false {dlb}
- char *ptr_stat = NULL;
+ char *ptr_stat = NULL;
bool *ptr_redraw = NULL;
char newValue = 0; // holds new value, for comparison to old {dlb}
@@ -3055,7 +3055,8 @@ static void _rot_inventory_food(long time_delta)
}
turn_corpse_into_skeleton(item);
- you.wield_change = true;
+ if (you.equip[EQ_WEAPON] == i)
+ you.wield_change = true;
burden_changed_by_rot = true;
num_corpses_rotted++;
@@ -3069,6 +3070,8 @@ static void _rot_inventory_food(long time_delta)
&& (item.special + (time_delta / 20) >= 100))
{
rotten_items.push_back(index_to_letter(i));
+ if (you.equip[EQ_WEAPON] == i)
+ you.wield_change = true;
}
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index a9390b6d4f..755098169a 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -251,11 +251,13 @@ static bool _find_butchering_implement(int &butcher_tool)
if (!potential_candidate)
{
- mpr("You don't carry any weapon that could be used for butchering.");
+ mpr("You don't carry any weapon you could use for butchering.");
if (Options.tutorial_left)
+ {
mpr("You should pick up the first knife, dagger, sword or axe "
"you find so you can use it to butcher corpses.",
MSGCH_TUTORIAL);
+ }
return (false);
}
@@ -295,11 +297,16 @@ static bool _find_butchering_implement(int &butcher_tool)
if (is_valid_item(you.inv[item_slot])
&& you.inv[item_slot].base_type == OBJ_WEAPONS
- && can_cut_meat(you.inv[item_slot])
- && can_wield(&you.inv[item_slot]))
+ && can_cut_meat(you.inv[item_slot]))
{
- butcher_tool = item_slot;
- return (true);
+ if (can_wield(&you.inv[item_slot]))
+ {
+ butcher_tool = item_slot;
+ return (true);
+ }
+
+ mpr("You can't wield this item!");
+ return (false);
}
mpr("That item isn't sharp enough!");
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9478afdb21..dfa25d8a3f 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3158,12 +3158,20 @@ void jewellery_wear_effects(item_def &item)
case RING_SUSTAIN_ABILITIES:
case RING_SUSTENANCE:
case RING_SLAYING:
- case RING_SEE_INVISIBLE:
case RING_WIZARDRY:
case RING_REGENERATION:
case RING_TELEPORT_CONTROL:
break;
+ case RING_SEE_INVISIBLE:
+ // We might have to turn autopickup back on again.
+ // TODO: Check all monsters in LOS. If any of them are invisible
+ // (and thus become visible once the ring is worn), the ring
+ // should be autoidentified.
+ if (item_type_known(item))
+ autotoggle_autopickup(false);
+ break;
+
case RING_PROTECTION:
you.redraw_armour_class = true;
if (item.plus != 0)
@@ -3435,6 +3443,14 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
prop_str += randart_known_wpn_property(item, RAP_STRENGTH);
prop_int += randart_known_wpn_property(item, RAP_INTELLIGENCE);
prop_dex += randart_known_wpn_property(item, RAP_DEXTERITY);
+
+ if (!remove && randart_known_wpn_property(item, RAP_EYESIGHT))
+ {
+ // We might have to turn autopickup back on again.
+ // This is not optimal, in that it could also happen if we do
+ // not know the property (in which case it should become known).
+ autotoggle_autopickup(false);
+ }
}
if (remove)
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index bc1966fd8f..1d89da8ea2 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -28,6 +28,7 @@ REVISION("$Rev$");
#include "abl-show.h"
#include "cio.h"
+#include "delay.h"
#include "defines.h"
#include "effects.h"
#include "format.h"
@@ -1978,7 +1979,6 @@ static int _handle_conflicting_mutations(mutation_type mutation,
};
for (unsigned i = 0; i < ARRAYSZ(simple_conflict); ++i)
- {
for (int j = 0; j < 2; ++j)
{
// If we have one of the pair, delete a level of the other,
@@ -1991,7 +1991,6 @@ static int _handle_conflicting_mutations(mutation_type mutation,
return (1); // Nothing more to do.
}
}
- }
return (0);
}
@@ -2192,10 +2191,8 @@ bool mutate(mutation_type which_mutation, bool failMsg,
// Breathe poison replaces spit poison (so it takes the slot).
for (int i = 0; i < 52; ++i)
- {
if (you.ability_letter_table[i] == ABIL_SPIT_POISON)
you.ability_letter_table[i] = ABIL_BREATHE_POISON;
- }
}
}
@@ -2272,6 +2269,13 @@ bool mutate(mutation_type which_mutation, bool failMsg,
}
break;
+ case MUT_ACUTE_VISION:
+ // We might have to turn autopickup back on again.
+ mpr(mdef.gain[you.mutation[mutat]], MSGCH_MUTATION);
+ gain_msg = false;
+ autotoggle_autopickup(false);
+ break;
+
default:
break;
}
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index dc9d778111..c1fd6c1d53 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -349,8 +349,16 @@ void cast_see_invisible(int pow)
if (player_see_invis())
mpr("Nothing seems to happen.");
else
+ {
mpr("Your vision seems to sharpen.");
+ // We might have to turn autopickup back on again.
+ // TODO: Once the spell times out we might want to check all monsters
+ // in LOS for invisibility and turn autopickup off again, if
+ // needed.
+ autotoggle_autopickup(false);
+ }
+
// No message if you already are under the spell.
you.duration[DUR_SEE_INVISIBLE] += 10 + random2(2 + (pow / 2));
@@ -1821,7 +1829,7 @@ bool wielding_rocks()
bool cast_sandblast(int pow, bolt &beam)
{
- const bool big = wielding_rocks();
+ const bool big = wielding_rocks();
const bool success = zapping(big ? ZAP_SANDBLAST
: ZAP_SMALL_SANDBLAST, pow, beam, true);
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 48b22f577a..735c1d58fc 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -2317,7 +2317,7 @@ static int _power_to_barcount( int power )
int spell_power_bars( spell_type spell )
{
const int cap = spell_power_cap(spell);
- if ( cap == 0 )
+ if (cap == 0)
return -1;
const int power = std::min(calc_spell_power(spell, true), cap);
return _power_to_barcount(power);
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 4b52954da6..fea2e61aeb 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -974,13 +974,12 @@ int spell_power_cap(spell_type spell)
return (_seekspell(spell)->power_cap);
}
-// Sandblast range is 1 if not wielding rocks, 1-2 if you are.
-// For targetting purposes, of course, be optimistic about range.
+// Sandblast range is 1 if not wielding rocks, 2 if you are.
static int _sandblast_range(int pow, bool real_cast)
{
int res = 1;
- if (wielding_rocks() && (!real_cast || coinflip()))
+ if (wielding_rocks())
res = 2;
return (res);