From 0606bf3c814c655de0e1b2ae40358a7ef007e46b Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Mon, 20 Oct 2025 14:41:05 -0500 Subject: [PATCH] Cursed players have an increased chance of drawing bad tarot cards (#93511) ## About The Pull Request Having `TRAIT_CURSED` drastically increases your chance of drawing "Death" or "The Tower" from a tarot deck ## Why It's Good For The Game Well it's called "bad luck" for a reason ## Changelog :cl: Melbert add: Cursed / Unlucky players have an increased chance of drawing bad tarot cards /:cl: --- code/modules/cards/cards.dm | 7 ++++++- code/modules/cards/deck/tarot.dm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/code/modules/cards/cards.dm b/code/modules/cards/cards.dm index 046c3e47906..7fcb19da6bb 100644 --- a/code/modules/cards/cards.dm +++ b/code/modules/cards/cards.dm @@ -131,13 +131,18 @@ var/list/cards = fetch_card_atoms() - card = card || cards[1] //draw the card on top + card ||= pick_card(user, cards) cards -= card update_appearance() playsound(src, 'sound/items/cards/cardflip.ogg', 50, TRUE) return card +/// Picks what card the user draws from the deck +/obj/item/toy/cards/proc/pick_card(mob/living/user, list/obj/item/toy/singlecard/cards) + // By default just pick the top card + return cards[1] + /// Returns the cards in this deck. /// Lazily generates the cards if they haven't already been made. /obj/item/toy/cards/proc/fetch_card_atoms() diff --git a/code/modules/cards/deck/tarot.dm b/code/modules/cards/deck/tarot.dm index 5fa7f25e61e..a408b04a6cf 100644 --- a/code/modules/cards/deck/tarot.dm +++ b/code/modules/cards/deck/tarot.dm @@ -28,6 +28,23 @@ M.Turn(180) card.transform = M +/obj/item/toy/cards/deck/tarot/pick_card(mob/living/user, list/obj/item/toy/singlecard/cards) + // If the user is cursed they have increase chance of drawing Death or The Tower + if(!HAS_TRAIT(user, TRAIT_CURSED)) + return ..() + + var/total_card = length(cards) + // give a boosted chance if they're using the full deck + var/chance_modifier = total_card >= 56 ? 24 : 4 + if(!prob(min(33, chance_modifier / total_card * 100))) + return ..() + + for(var/obj/item/toy/singlecard/card as anything in cards) + if(card.cardname == "Death" || card.cardname == "The Tower") + return card + + return ..() + /obj/item/toy/cards/deck/tarot/haunted name = "haunted tarot game deck" desc = "A spooky looking tarot deck. You can sense a supernatural presence linked to the cards..."