Skip to content

Commit

Permalink
Allow batform to quaff potions and open doors
Browse files Browse the repository at this point in the history
It was a fairly weird exception - all the other player bad-polymorph forms can
read and quaff, and even wisp/pig/porcupine could use doors. Also makes Vampire
batform a little better and less fiddly.
  • Loading branch information
Chris Campbell committed Oct 8, 2016
1 parent 0ef4e39 commit 63cf2ba
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/descript/ability.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Breathes a blast of noxious fumes at a targeted creature.
Bat Form ability

Transforms you into a swift-moving vampire bat. The user becomes unable to
drink potions or evoke wands, to open or close doors, or to cast spells.
evoke wands or to cast spells.
%%%%
Spit Acid ability

Expand Down
7 changes: 0 additions & 7 deletions crawl-ref/source/item_use.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1896,13 +1896,6 @@ void drink(item_def* potion)
return;
}

if (you.form == TRAN_BAT)
{
canned_msg(MSG_PRESENT_FORM);
_vampire_corpse_help();
return;
}

if (you.duration[DUR_NO_POTIONS])
{
mpr("You cannot drink potions in your current state!");
Expand Down
14 changes: 0 additions & 14 deletions crawl-ref/source/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2848,14 +2848,6 @@ static void _open_door(coord_def move)
return;
}

// If we get here, the player either hasn't picked a direction yet,
// or the chosen direction actually contains a closed door.
if (!player_can_open_doors())
{
mpr("You can't open doors in your present form.");
return;
}

if (you.confused())
{
canned_msg(MSG_TOO_CONFUSED);
Expand Down Expand Up @@ -2946,12 +2938,6 @@ static void _open_door(coord_def move)

static void _close_door(coord_def move)
{
if (!player_can_open_doors())
{
mpr("You can't close doors in your present form.");
return;
}

if (you.attribute[ATTR_HELD])
{
mprf("You can't close doors while %s.", held_status());
Expand Down
5 changes: 0 additions & 5 deletions crawl-ref/source/player.cc
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,6 @@ bool player_likes_lava(bool permanently)
&& form_likes_lava();
}

bool player_can_open_doors()
{
return you.form != TRAN_BAT;
}

/**
* Is the player considered to be closely related, if not the same species, to
* the given monster? (See mon-data.h for species/genus info.)
Expand Down
2 changes: 0 additions & 2 deletions crawl-ref/source/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,6 @@ void forget_map(bool rot = false);
int get_exp_progress();
void gain_exp(unsigned int exp_gained, unsigned int* actual_gain = nullptr);

bool player_can_open_doors();

void level_change(bool skip_attribute_increase = false);
void adjust_level(int diff, bool just_xp = false);

Expand Down
4 changes: 0 additions & 4 deletions crawl-ref/source/travel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ bool feat_is_traversable_now(dungeon_feature_type grid, bool try_fallback)
// Permanently flying players can cross most hostile terrain.
if (grid == DNGN_DEEP_WATER || grid == DNGN_LAVA)
return you.permanent_flight();

// You can't open doors in bat form.
if (grid == DNGN_CLOSED_DOOR || grid == DNGN_RUNED_DOOR)
return player_can_open_doors();
}

return feat_is_traversable(grid, try_fallback);
Expand Down

0 comments on commit 63cf2ba

Please sign in to comment.