summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorShayne Halvorson <N78291@gmail.com>2014-05-10 15:18:38 -0500
committerreaverb <reaverb.Crawl@gmail.com>2014-05-28 01:14:21 -0400
commit1ee73f30e7cf1ee6bcfe891003b226738c81bde5 (patch)
tree7acb1b494631f65421591a082debc5c98a8989b0 /crawl-ref/source/decks.cc
parenta2954550f67acdb7cdc7145f059a242a27b9da28 (diff)
downloadcrawl-ref-1ee73f30e7cf1ee6bcfe891003b226738c81bde5.tar.gz
crawl-ref-1ee73f30e7cf1ee6bcfe891003b226738c81bde5.zip
Reduce Flight card to Shaft card.
The other effects are all duplicated (by other cards, even!), while shafts have uses both on the player and on monsters.
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc47
1 files changed, 9 insertions, 38 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 949ca40006..cd7ab8579b 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -112,7 +112,7 @@ const deck_archetype deck_of_emergency[] =
{ CARD_TOMB, {5, 5, 5} },
{ CARD_BANSHEE, {5, 5, 5} },
{ CARD_DAMNATION, {0, 1, 2} },
- { CARD_FLIGHT, {5, 5, 5} },
+ { CARD_SHAFT, {5, 5, 5} },
{ CARD_ALCHEMIST, {5, 5, 5} },
END_OF_DECK
};
@@ -353,7 +353,7 @@ const char* card_name(card_type card)
case CARD_FAMINE: return "Famine";
case CARD_FEAST: return "the Feast";
case CARD_WARPWRIGHT: return "Warpwright";
- case CARD_FLIGHT: return "Flight";
+ case CARD_SHAFT: return "the Shaft";
case CARD_VITRIOL: return "Vitriol";
case CARD_FLAME: return "Flame";
case CARD_FROST: return "Frost";
@@ -1700,46 +1700,17 @@ static void _warpwright_card(int power, deck_rarity_type rarity)
}
}
-static void _flight_card(int power, deck_rarity_type rarity)
+static void _shaft_card()
{
- const int power_level = _get_power_level(power, rarity);
-
- // Assume something _will_ happen.
- bool success = true;
-
- if (power_level == 0)
- {
- if (!transform(random2(power/4), coinflip() ? TRAN_SPIDER : TRAN_BAT,
- true))
- {
- // Oops, something went wrong here (either because of cursed
- // equipment or the possibility of stat loss).
- success = false;
- }
- }
- else if (power_level >= 1)
- {
- cast_fly(random2(power/4));
- if (!you_worship(GOD_CHEIBRIADOS))
- cast_swiftness(random2(power/4));
- else
- simple_god_message(" protects you from inadvertent hurry.");
- }
-
- if (power_level == 2) // Stacks with the above.
+ if (is_valid_shaft_level() && grd(you.pos()) == DNGN_FLOOR)
{
- if (is_valid_shaft_level() && grd(you.pos()) == DNGN_FLOOR)
+ if (place_specific_trap(you.pos(), TRAP_SHAFT))
{
- if (place_specific_trap(you.pos(), TRAP_SHAFT))
- {
- find_trap(you.pos())->reveal();
- mpr("A shaft materialises beneath you!");
- }
+ find_trap(you.pos())->reveal();
+ mpr("A shaft materialises beneath you!");
}
}
- if (one_chance_in(4 - power_level))
- potion_effect(POT_INVISIBILITY, random2(power)/4);
- else if (!success)
+ else
canned_msg(MSG_NOTHING_HAPPENS);
}
@@ -2843,7 +2814,7 @@ void card_effect(card_type which_card, deck_rarity_type rarity,
case CARD_GENIE: _genie_card(power, rarity); break;
case CARD_CURSE: _curse_card(power, rarity); break;
case CARD_WARPWRIGHT: _warpwright_card(power, rarity); break;
- case CARD_FLIGHT: _flight_card(power, rarity); break;
+ case CARD_SHAFT: _shaft_card(); break;
case CARD_TOMB: entomb(10 + power/20 + random2(power/4)); break;
case CARD_WRAITH: drain_exp(false, power / 4); break;
case CARD_WRATH: _godly_wrath(); break;