summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-19 01:19:56 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-19 01:19:56 +0000
commit725cb5b4d5a3ade5c5e7b04a6210cedc839c2bdd (patch)
treed2644ce5f13e7ab649b27b49f7bdcde18802a6b1 /crawl-ref/source/decks.cc
parent1a36197574afe860feff7208cd883770a5d28946 (diff)
downloadcrawl-ref-725cb5b4d5a3ade5c5e7b04a6210cedc839c2bdd.tar.gz
crawl-ref-725cb5b4d5a3ade5c5e7b04a6210cedc839c2bdd.zip
Added new commands "re-do previous command" (bound to `) and "repeat
next command" (bound to 0). Though this is just an interface change, it changes code in the core input processing function (input() in acr.cc), and also messes around with the input buffer, so it could probably do with more testing before merging it into the 0.3 branch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2137 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 5a34d2554d..38ec142228 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -38,6 +38,7 @@
#include "spells4.h"
#include "spl-cast.h"
#include "spl-util.h"
+#include "state.h"
#include "stuff.h"
#include "terrain.h"
#include "transfor.h"
@@ -248,6 +249,7 @@ bool choose_deck_and_draw()
if ( !is_deck(deck) )
{
mpr("That isn't a deck!");
+ crawl_state.zero_turns_taken();
return false;
}
evoke_deck(deck);
@@ -261,12 +263,14 @@ bool deck_peek()
if ( !wielding_deck() )
{
mpr("You aren't wielding a deck!");
+ crawl_state.zero_turns_taken();
return false;
}
item_def& item(you.inv[you.equip[EQ_WEAPON]]);
if ( item.plus2 != 0 )
{
mpr("You already know what the next card will be.");
+ crawl_state.zero_turns_taken();
return false;
}
@@ -297,12 +301,14 @@ bool deck_stack()
if ( !wielding_deck() )
{
mpr("You aren't wielding a deck!");
+ crawl_state.zero_turns_taken();
return false;
}
item_def& item(you.inv[you.equip[EQ_WEAPON]]);
if ( item.plus2 != 0 )
{
mpr("You can't stack a marked deck.");
+ crawl_state.zero_turns_taken();
return false;
}
const int num_to_stack = (item.plus < 5 ? item.plus : 5);
@@ -357,6 +363,7 @@ bool deck_triple_draw()
if ( !wielding_deck() )
{
mpr("You aren't wielding a deck!");
+ crawl_state.zero_turns_taken();
return false;
}
@@ -366,6 +373,7 @@ bool deck_triple_draw()
if ( item.plus2 != 0 )
{
mpr("You can't triple draw from a marked deck.");
+ crawl_state.zero_turns_taken();
return false;
}