diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index b09c4af5..2a9ed42f 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -650,6 +650,7 @@ var/cooldown = 0 var/obj/machinery/computer/holodeck/holo = null // Holodeck cards should not be infinite var/list/cards = list() + var/original_size = 52 /obj/item/toy/cards/deck/Initialize() . = ..() @@ -699,16 +700,16 @@ H.parentdeck = src var/O = src H.apply_card_vars(H,O) - src.cards -= choice + src.cards.Cut(1,2) //Removes the top card from the list H.pickup(user) user.put_in_hands(H) user.visible_message("[user] draws a card from the deck.", "You draw a card from the deck.") update_icon() /obj/item/toy/cards/deck/update_icon() - if(cards.len > 26) + if(cards.len > original_size/2) icon_state = "deck_[deckstyle]_full" - else if(cards.len > 10) + else if(cards.len > original_size/4) icon_state = "deck_[deckstyle]_half" else if(cards.len > 0) icon_state = "deck_[deckstyle]_low" diff --git a/code/modules/games/unum.dm b/code/modules/games/unum.dm new file mode 100644 index 00000000..9820fa67 --- /dev/null +++ b/code/modules/games/unum.dm @@ -0,0 +1,22 @@ +/// A deck of unum cards. Classic. +/obj/item/toy/cards/deck/unum + name = "\improper UNUM deck" + desc = "A deck of unum cards. House rules to argue over not included." + icon = 'icons/obj/toy.dmi' + icon_state = "deck_unum_full" + deckstyle = "unum" + original_size = 108 + +//Populate the deck. +/obj/item/toy/cards/deck/unum/populate_deck() + for(var/colour in list("Red","Yellow","Green","Blue")) + cards += "[colour] 0" //Uno, i mean, cough cough, Unum decks have only one colour of each 0, weird huh? + for(var/k in 0 to 1) //two of each colour of number + cards += "[colour] skip" + cards += "[colour] reverse" + cards += "[colour] draw 2" + for(var/i in 1 to 9) + cards += "[colour] [i]" + for(var/k in 0 to 3) //4 wilds and draw 4s + cards += "Wildcard" + cards += "Draw 4" diff --git a/code/modules/vending/games.dm b/code/modules/vending/games.dm index 4e4d3365..8e985139 100644 --- a/code/modules/vending/games.dm +++ b/code/modules/vending/games.dm @@ -6,7 +6,8 @@ products = list(/obj/item/toy/cards/deck = 5, /obj/item/storage/pill_bottle/dice = 10, /obj/item/toy/cards/deck/cas = 3, - /obj/item/toy/cards/deck/cas/black = 3) + /obj/item/toy/cards/deck/cas/black = 3, + /obj/item/toy/cards/deck/unum = 3) contraband = list(/obj/item/dice/fudge = 9) refill_canister = /obj/item/vending_refill/games diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index 123cd4d1..333c8ca0 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 45042bd7..a024e301 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1821,6 +1821,7 @@ #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_spaghetti.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_sushi.dm" #include "code\modules\games\cas.dm" +#include "code\modules\games\unum.dm" #include "code\modules\goonchat\browserOutput.dm" #include "code\modules\holiday\easter.dm" #include "code\modules\holiday\holidays.dm"