Packs now put cards into your hand

This commit is contained in:
SmArtKar
2021-02-15 21:15:08 +03:00
parent 3ba4a9d670
commit 2b46d87742
+5 -1
View File
@@ -275,8 +275,12 @@
/obj/item/cardpack/attack_self(mob/user)
. = ..()
var/list/cards = buildCardListWithRarity(card_count, guaranteed_count)
var/obj/item/tcgcard_hand/hand = new(get_turf(user))
for(var/template in cards)
new /obj/item/tcg_card(get_turf(user), template, illegal)
var/obj/item/tcg_card/card = new(hand, template, illegal)
hand.cards.Add(card)
user.put_in_hands(hand)
hand.update_icon()
to_chat(user, "<span_class='notice'>Wow! Check out these cards!</span>")
playsound(loc, 'sound/items/poster_ripped.ogg', 20, TRUE)
if(prob(contains_coin))