summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/descript/cards.txt5
-rw-r--r--crawl-ref/source/decks.cc11
-rw-r--r--crawl-ref/source/decks.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/dat/descript/cards.txt b/crawl-ref/source/dat/descript/cards.txt
index c7e2ae97b3..e55af7cd97 100644
--- a/crawl-ref/source/dat/descript/cards.txt
+++ b/crawl-ref/source/dat/descript/cards.txt
@@ -256,6 +256,11 @@ Famine card
This card starves you.
It is usually only found in Nemelex Xobeh's deck of punishment.
%%%%
+the Swine card
+
+This card will make you pink and rooting for truffles.
+It is usually only found in Nemelex Xobeh's deck of punishment.
+%%%%
# deck of oddities (random card, along with a few others)
the Bargain card
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 78d445d64a..9f452a22b6 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -180,6 +180,7 @@ const deck_archetype deck_of_punishment[] = {
{ CARD_DAMNATION, {5, 5, 5} },
{ CARD_PORTAL, {5, 5, 5} },
{ CARD_MINEFIELD, {5, 5, 5} },
+ { CARD_SWINE, {5, 5, 5} },
END_OF_DECK
};
@@ -313,6 +314,7 @@ const char* card_name(card_type card)
case CARD_WRATH: return "Wrath";
case CARD_WRAITH: return "the Wraith";
case CARD_CURSE: return "the Curse";
+ case CARD_SWINE: return "the Swine";
case NUM_CARDS: return "a buggy card";
}
return "a very buggy card";
@@ -1226,6 +1228,7 @@ static int _xom_check_card(item_def &deck, card_type card,
case CARD_MINEFIELD:
case CARD_FAMINE:
case CARD_CURSE:
+ case CARD_SWINE:
// Always hilarious.
amusement = 255;
@@ -3049,6 +3052,14 @@ bool card_effect(card_type which_card, deck_rarity_type rarity,
else
set_hunger(12000, true);
break;
+
+ case CARD_SWINE:
+ if (!transform(random2(power), TRAN_PIG, true))
+ {
+ mpr("You feel like a pig.");
+ break;
+ }
+ break;
case NUM_CARDS:
// The compiler will complain if any card remains unhandled.
diff --git a/crawl-ref/source/decks.h b/crawl-ref/source/decks.h
index 6fccd687c2..e4e8440ad1 100644
--- a/crawl-ref/source/decks.h
+++ b/crawl-ref/source/decks.h
@@ -115,6 +115,7 @@ enum card_type
CARD_FEAST,
CARD_FAMINE,
CARD_CURSE, // Curse your items
+ CARD_SWINE, // *oink*
NUM_CARDS
};