From 781c1cda9ce49cec2064cbf438e52ef6aaff41a3 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 25 May 2009 07:09:56 +0000 Subject: Added some new tutorial events (not tested with the tile build): * Auto-explore hint (200 turns after level map hint). * Explanation of the "Your equipment suddenly weighs less" message. * Explanations of trap and heap branding (non-tile builds only). * A note that monsters that have moved out of LOS haven't just vanished. * Events for gaining an ability from a mutation and gaining one from an item which was just equipped, separate from the event for the first divinely granted ability. * An explanation that shouting monsters have just noticed you, plus that their shout is likely to attract the attention of other monsters. * A "seen portal vault entrance" event, since the entry to the sewers can appear on DL 3 through 6, and there's also a very small chance of a Zigguart entrance apearing as early as DL 3. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9823 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 60547947e4..776f68adb3 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -18,6 +18,7 @@ REVISION("$Rev$"); #include "externs.h" +#include "abl-show.h" #include "beam.h" #include "cio.h" #include "cloud.h" @@ -335,6 +336,8 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages, if (you.equip[EQ_WEAPON] != -1 && !unwield_item(show_weff_messages)) return (false); + const unsigned int old_talents = your_talents(false).size(); + you.equip[EQ_WEAPON] = item_slot; // Any oddness on wielding taken care of here. @@ -346,6 +349,9 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages, if (show_weff_messages) wield_warning(); + if (Options.tutorial_left && your_talents(false).size() > old_talents) + learned_something_new(TUT_NEW_ABILITY_ITEM); + // Time calculations. you.time_taken /= 2; @@ -3604,12 +3610,17 @@ bool puton_item(int item_slot) hand_used = EQ_RIGHT_RING; } + const unsigned int old_talents = your_talents(false).size(); + // Actually equip the item. you.equip[hand_used] = item_slot; // And calculate the effects. jewellery_wear_effects(item); + if (Options.tutorial_left && your_talents(false).size() > old_talents) + learned_something_new(TUT_NEW_ABILITY_ITEM); + // Putting on jewellery is as fast as wielding weapons. you.time_taken /= 2; you.turn_is_over = true; -- cgit v1.2.3-54-g00ecf