summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorShayne Halvorson <N78291@gmail.com>2014-05-10 14:00:54 -0500
committerreaverb <reaverb.Crawl@gmail.com>2014-05-28 01:14:20 -0400
commit89ace16763fea7c0354a9a6ffe810b9caced13e4 (patch)
tree58a5b267299674ce29d0a341277de28a0cc356e3 /crawl-ref/source/decks.cc
parent9820907aeb13857cb306fb2f51f64999a78ccbb1 (diff)
downloadcrawl-ref-89ace16763fea7c0354a9a6ffe810b9caced13e4.tar.gz
crawl-ref-89ace16763fea7c0354a9a6ffe810b9caced13e4.zip
Alter the decks Nemelex gifts.
Decks of war and decks of escape are now Nemelex' decks; decks of wonders contain the cards that Nemelex doesn't gift. Some cards have been move to fit this. Warp (blink) and Portal (teleport) cards are removed.
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc66
1 files changed, 12 insertions, 54 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index e92b303ab5..8acd4c87d8 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -98,10 +98,10 @@ typedef card_with_weights deck_archetype;
const deck_archetype deck_of_transport[] =
{
- { CARD_PORTAL, {5, 5, 5} },
- { CARD_WARP, {5, 5, 5} },
- { CARD_SWAP, {5, 5, 5} },
- { CARD_VELOCITY, {5, 5, 5} },
+ { CARD_WARPWRIGHT, {5, 5, 5} },
+ { CARD_SWAP, {5, 5, 5} },
+ { CARD_VELOCITY, {5, 5, 5} },
+ { CARD_SOLITUDE, {5, 5, 5} },
END_OF_DECK
};
@@ -110,8 +110,6 @@ const deck_archetype deck_of_emergency[] =
{ CARD_TOMB, {5, 5, 5} },
{ CARD_BANSHEE, {5, 5, 5} },
{ CARD_DAMNATION, {0, 1, 2} },
- { CARD_SOLITUDE, {5, 5, 5} },
- { CARD_WARPWRIGHT, {5, 5, 5} },
{ CARD_FLIGHT, {5, 5, 5} },
{ CARD_ALCHEMIST, {5, 5, 5} },
END_OF_DECK
@@ -133,12 +131,12 @@ const deck_archetype deck_of_destruction[] =
const deck_archetype deck_of_battle[] =
{
{ CARD_ELIXIR, {5, 5, 5} },
- { CARD_BATTLELUST, {5, 5, 5} },
+ { CARD_POTION, {5, 5, 5} },
{ CARD_METAMORPHOSIS, {5, 5, 5} },
{ CARD_HELM, {5, 5, 5} },
{ CARD_BLADE, {5, 5, 5} },
{ CARD_SHADOW, {5, 5, 5} },
- { CARD_MERCENARY, {5, 5, 5} },
+ { CARD_DOWSING, {5, 5, 5} },
END_OF_DECK
};
@@ -165,11 +163,10 @@ const deck_archetype deck_of_wonders[] =
{ CARD_POTION, {5, 5, 5} },
{ CARD_FOCUS, {1, 1, 1} },
{ CARD_WILD_MAGIC, {5, 3, 1} },
- { CARD_DOWSING, {5, 5, 5} },
{ CARD_BATTLELUST, {5, 5, 5} },
{ CARD_HELM, {5, 5, 5} },
{ CARD_SHADOW, {5, 5, 5} },
-
+ { CARD_MERCENARY, {5, 5, 5} },
END_OF_DECK
};
@@ -194,6 +191,7 @@ const deck_archetype deck_of_oddities[] =
{ CARD_FAMINE, {5, 5, 5} },
{ CARD_CURSE, {5, 5, 5} },
{ CARD_HELIX, {5, 5, 5} },
+ { CARD_FOCUS, {5, 5, 5} },
END_OF_DECK
};
@@ -304,8 +302,10 @@ const char* card_name(card_type card)
{
switch (card)
{
+#if TAG_MAJOR_VERSION == 34
case CARD_PORTAL: return "the Portal";
case CARD_WARP: return "the Warp";
+#endif
case CARD_SWAP: return "Swap";
case CARD_VELOCITY: return "Velocity";
case CARD_DAMNATION: return "Damnation";
@@ -417,8 +417,6 @@ static const vector<const deck_archetype *> _subdecks(uint8_t deck_type)
subdecks.push_back(deck_of_enchantments);
subdecks.push_back(deck_of_battle);
subdecks.push_back(deck_of_summoning);
- subdecks.push_back(deck_of_transport);
- subdecks.push_back(deck_of_emergency);
break;
case MISC_DECK_OF_CHANGES:
subdecks.push_back(deck_of_battle);
@@ -1608,46 +1606,6 @@ static int _get_power_level(int power, deck_rarity_type rarity)
}
// Actual card implementations follow.
-static void _portal_card(int power, deck_rarity_type rarity)
-{
- const int control_level = _get_power_level(power, rarity);
- bool controlled = false;
-
- if (x_chance_in_y(control_level, 2))
- controlled = true;
-
- int threshold = 9;
- const bool was_controlled = player_control_teleport();
- const bool short_control = (you.duration[DUR_CONTROL_TELEPORT] > 0
- && you.duration[DUR_CONTROL_TELEPORT]
- < threshold * BASELINE_DELAY);
-
- if (controlled && (!was_controlled || short_control))
- you.set_duration(DUR_CONTROL_TELEPORT, threshold); // Long enough to kick in.
-
- if (x_chance_in_y(control_level, 2))
- random_blink(false);
-
- you_teleport();
-}
-
-static void _warp_card(int power, deck_rarity_type rarity)
-{
- if (you.no_tele(true, true, true))
- {
- canned_msg(MSG_STRANGE_STASIS);
- return;
- }
-
- const int control_level = _get_power_level(power, rarity);
- if (!you.confused() && control_level >= 2)
- blink(1000, false);
- else if (!you.confused() && control_level == 1
- && allow_control_teleport(true))
- cast_semi_controlled_blink(power / 4, false, false);
- else
- random_blink(false);
-}
static void _swap_monster_card(int power, deck_rarity_type rarity)
{
@@ -2797,8 +2755,6 @@ void card_effect(card_type which_card, deck_rarity_type rarity,
switch (which_card)
{
- case CARD_PORTAL: _portal_card(power, rarity); break;
- case CARD_WARP: _warp_card(power, rarity); break;
case CARD_SWAP: _swap_monster_card(power, rarity); break;
case CARD_VELOCITY: _velocity_card(power, rarity); break;
case CARD_DAMNATION: _damnation_card(power, rarity); break;
@@ -2888,6 +2844,8 @@ void card_effect(card_type which_card, deck_rarity_type rarity,
case CARD_GLASS:
case CARD_TROWEL:
case CARD_MINEFIELD:
+ case CARD_PORTAL:
+ case CARD_WARP:
mpr("This type of card no longer exists!");
break;
#endif