summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/decks.cc10
-rw-r--r--crawl-ref/source/version.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index fdcf348bf8..6797a503ed 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1362,6 +1362,15 @@ static void _swap_monster_card(int power, deck_rarity_type rarity)
{
monsters& mon(*mon_to_swap);
const coord_def newpos = mon.pos();
+
+ // Be nice: no swapping into uninhabitable environments.
+ if (is_grid_dangerous(grd(newpos))
+ || !monster_habitable_grid(mon_to_swap, grd(you.pos())))
+ {
+ mpr("You spin around.");
+ return;
+ }
+
bool mon_caught = mons_is_caught(&mon);
bool you_caught = you.attribute[ATTR_HELD];
@@ -1382,6 +1391,7 @@ static void _swap_monster_card(int power, deck_rarity_type rarity)
}
// Move you to its previous location.
+ // FIXME: this should also handle merfolk swimming, etc.
you.moveto(newpos);
if (mon_caught)
diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h
index 08a0796d5b..39c03be5fe 100644
--- a/crawl-ref/source/version.h
+++ b/crawl-ref/source/version.h
@@ -37,7 +37,7 @@
#define CRAWL "Dungeon Crawl Stone Soup"
-#define VER_NUM "0.4.4"
+#define VER_NUM "0.4.5"
#define VER_QUAL ""
// last updated 07august2001 {mv}