mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Gamble buffs (#11588)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d773f84f8b
commit
ab809aa516
@@ -345,3 +345,20 @@
|
||||
)
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate
|
||||
|
||||
/datum/supply_pack/recreation/gambling
|
||||
name = "Gambling Game Crate"
|
||||
desc = "A bunch of supplies for gambling games, includes 5000 replica casino chips, a triple size deck of cards and dice bags."
|
||||
contains = list(
|
||||
/obj/item/spacecasinocash_fake/c1000,
|
||||
/obj/item/spacecasinocash_fake/c1000,
|
||||
/obj/item/spacecasinocash_fake/c1000,
|
||||
/obj/item/spacecasinocash_fake/c1000,
|
||||
/obj/item/spacecasinocash_fake/c1000,
|
||||
/obj/item/deck/cards/triple,
|
||||
/obj/item/storage/pill_bottle/dice,
|
||||
/obj/item/storage/pill_bottle/dice_nerd,
|
||||
/obj/item/storage/dicecup
|
||||
)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate
|
||||
|
||||
@@ -205,3 +205,145 @@
|
||||
comment = "Joker"
|
||||
user.visible_message(span_notice("[user] has thrown \the [src]. It lands on [comment]! "), \
|
||||
span_notice("You throw \the [src]. It lands on [comment]! "))
|
||||
|
||||
|
||||
//Fake casino chips that can be ordered at any time
|
||||
|
||||
/obj/item/spacecasinocash_fake
|
||||
name = "broken replica casino chip"
|
||||
desc = "It's worth nothing in a casino."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/casino.dmi'
|
||||
icon_state = "spacecasinocash1"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
force = 1.0
|
||||
throwforce = 1.0
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/access = list()
|
||||
access = ACCESS_CRATE_CASH
|
||||
var/worth = 0
|
||||
|
||||
/obj/item/spacecasinocash_fake/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/spacecasinocash_fake))
|
||||
|
||||
var/obj/item/spacecasinocash_fake/SC = W
|
||||
|
||||
SC.adjust_worth(src.worth)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/h_user = user
|
||||
|
||||
h_user.drop_from_inventory(src)
|
||||
h_user.drop_from_inventory(SC)
|
||||
h_user.put_in_hands(SC)
|
||||
to_chat(user, span_notice("You combine the casino chips to a stack of [SC.worth] replica casino credits."))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/spacecasinocash_fake/update_icon()
|
||||
overlays.Cut()
|
||||
name = "[worth] replica casino chip\s"
|
||||
if(worth in list(1000,500,200,100,50,20,10,1))
|
||||
icon_state = "spacecasinocash[worth]"
|
||||
desc = "It's a stack of replica casino chips with a combined value of [worth] imaginary points."
|
||||
return
|
||||
var/sum = src.worth
|
||||
var/num = 0
|
||||
for(var/i in list(1000,500,200,100,50,20,10,1))
|
||||
while(sum >= i && num < 50)
|
||||
sum -= i
|
||||
num++
|
||||
var/image/banknote = image('icons/obj/casino.dmi', "spacecasinocash[i]")
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(rand(-6, 6), rand(-4, 8))
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
if(num == 0) // Less than one credit, let's just make it look like 1 for ease
|
||||
var/image/banknote = image('icons/obj/casino.dmi', "spacecasinocash1")
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(rand(-6, 6), rand(-4, 8))
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
src.desc = "They are worth [worth] replica casino credits."
|
||||
|
||||
/obj/item/spacecasinocash_fake/proc/adjust_worth(var/adjust_worth = 0, var/update = 1)
|
||||
worth += adjust_worth
|
||||
if(worth > 0)
|
||||
if(update)
|
||||
update_icon()
|
||||
return worth
|
||||
else
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
/obj/item/spacecasinocash_fake/proc/set_worth(var/new_worth = 0, var/update = 1)
|
||||
worth = max(0, new_worth)
|
||||
if(update)
|
||||
update_icon()
|
||||
return worth
|
||||
|
||||
/obj/item/spacecasinocash_fake/attack_self(mob/user)
|
||||
var/amount = tgui_input_number(user, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20, src.worth)
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
amount = round(CLAMP(amount, 0, src.worth))
|
||||
|
||||
if(!amount)
|
||||
return
|
||||
|
||||
adjust_worth(-amount)
|
||||
var/obj/item/spacecasinocash_fake/SC = new (user.loc)
|
||||
SC.set_worth(amount)
|
||||
user.put_in_hands(SC)
|
||||
|
||||
/obj/item/spacecasinocash_fake/c1
|
||||
name = "1 replica casino chip"
|
||||
icon_state = "spacecasinocash1"
|
||||
desc = "It's worth 1 credit."
|
||||
worth = 1
|
||||
|
||||
/obj/item/spacecasinocash_fake/c10
|
||||
name = "10 replica casino chip"
|
||||
icon_state = "spacecasinocash10"
|
||||
desc = "It's worth 10 credits."
|
||||
worth = 10
|
||||
|
||||
/obj/item/spacecasinocash_fake/c20
|
||||
name = "20 replica casino chip"
|
||||
icon_state = "spacecasinocash20"
|
||||
desc = "It's worth 20 credits."
|
||||
worth = 20
|
||||
|
||||
/obj/item/spacecasinocash_fake/c50
|
||||
name = "50 replica casino chip"
|
||||
icon_state = "spacecasinocash50"
|
||||
desc = "It's worth 50 credits."
|
||||
worth = 50
|
||||
|
||||
/obj/item/spacecasinocash_fake/c100
|
||||
name = "100 replica casino chip"
|
||||
icon_state = "spacecasinocash100"
|
||||
desc = "It's worth 100 credits."
|
||||
worth = 100
|
||||
|
||||
/obj/item/spacecasinocash_fake/c200
|
||||
name = "200 replica casino chip"
|
||||
icon_state = "spacecasinocash200"
|
||||
desc = "It's worth 200 credits."
|
||||
worth = 200
|
||||
|
||||
/obj/item/spacecasinocash_fake/c500
|
||||
name = "500 replica casino chip"
|
||||
icon_state = "spacecasinocash500"
|
||||
desc = "It's worth 500 credits."
|
||||
worth = 500
|
||||
|
||||
/obj/item/spacecasinocash_fake/c1000
|
||||
name = "1000 replica casino chip"
|
||||
icon_state = "spacecasinocash1000"
|
||||
desc = "It's worth 1000 credits."
|
||||
worth = 1000
|
||||
|
||||
@@ -1275,9 +1275,11 @@
|
||||
/obj/item/deck/cah/black = 5,
|
||||
/obj/item/deck/tarot = 5,
|
||||
/obj/item/deck/cards = 5,
|
||||
/obj/item/deck/cards/triple =5,
|
||||
/obj/item/pack/spaceball = 10,
|
||||
/obj/item/storage/pill_bottle/dice = 5,
|
||||
/obj/item/storage/pill_bottle/dice_nerd = 5,
|
||||
/obj/item/spacecasinocash_fake/c1000 = 50,
|
||||
/obj/item/melee/umbrella/random = 10,
|
||||
/obj/item/picnic_blankets_carried = 10,
|
||||
/obj/item/deck/schnapsen = 5,
|
||||
@@ -1289,9 +1291,11 @@
|
||||
/obj/item/deck/cah/black = 100,
|
||||
/obj/item/deck/tarot = 100,
|
||||
/obj/item/deck/cards = 100,
|
||||
/obj/item/deck/cards/triple = 150,
|
||||
/obj/item/pack/spaceball = 100,
|
||||
/obj/item/storage/pill_bottle/dice = 100,
|
||||
/obj/item/storage/pill_bottle/dice_nerd = 100,
|
||||
/obj/item/spacecasinocash_fake/c1000 = 100,
|
||||
/obj/item/melee/umbrella/random = 100,
|
||||
/obj/item/picnic_blankets_carried = 100,
|
||||
/obj/item/deck/schnapsen = 100,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/obj/item/deck
|
||||
w_class = ITEMSIZE_SMALL
|
||||
icon = 'icons/obj/playing_cards.dmi'
|
||||
description_info = "Alt click to shuffle, Ctrl click to deal, Ctrl+Shift click to deal multiple."
|
||||
var/list/cards = list()
|
||||
var/cooldown = 0 // to prevent spam shuffle
|
||||
|
||||
@@ -165,6 +166,12 @@
|
||||
|
||||
deal_at(usr, M, dcard)
|
||||
|
||||
/obj/item/deck/CtrlClick(mob/user)
|
||||
deal_card()
|
||||
|
||||
/obj/item/deck/CtrlShiftClick(mob/user)
|
||||
deal_card_multi()
|
||||
|
||||
/obj/item/deck/proc/deal_at(mob/user, mob/target, dcard) // Take in the no. of card to be dealt
|
||||
var/obj/item/hand/H = new(get_step(user, user.dir))
|
||||
var/i
|
||||
@@ -236,6 +243,10 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/deck/AltClick(mob/user)
|
||||
if(user.stat || !Adjacent(user))
|
||||
return
|
||||
shuffle(user)
|
||||
|
||||
/obj/item/deck/MouseDrop(mob/user) // Code from Paper bin, so you can still pick up the deck
|
||||
if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user))))))
|
||||
@@ -273,6 +284,42 @@
|
||||
user.put_in_hands(src)
|
||||
return
|
||||
|
||||
/obj/item/deck/cards/triple
|
||||
name = "big deck of cards"
|
||||
desc = "A simple deck of playing cards with triple the number of cards."
|
||||
|
||||
/obj/item/deck/cards/triple/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/playingcard/P
|
||||
for(var/a = 0, a<3, a++)
|
||||
for(var/suit in list("spades","clubs","diamonds","hearts"))
|
||||
|
||||
var/colour
|
||||
if(suit == "spades" || suit == "clubs")
|
||||
colour = "black_"
|
||||
else
|
||||
colour = "red_"
|
||||
|
||||
for(var/number in list("ace","two","three","four","five","six","seven","eight","nine","ten"))
|
||||
P = new()
|
||||
P.name = "[number] of [suit]"
|
||||
P.card_icon = "[colour]num"
|
||||
P.back_icon = "card_back"
|
||||
cards += P
|
||||
|
||||
for(var/number in list("jack","queen","king"))
|
||||
P = new()
|
||||
P.name = "[number] of [suit]"
|
||||
P.card_icon = "[colour]col"
|
||||
P.back_icon = "card_back"
|
||||
cards += P
|
||||
|
||||
for(var/i = 0, i<2, i++)
|
||||
P = new()
|
||||
P.name = "joker"
|
||||
P.card_icon = "joker"
|
||||
cards += P
|
||||
|
||||
/obj/item/pack/
|
||||
name = "Card Pack"
|
||||
desc = "For those with disposible income."
|
||||
@@ -302,7 +349,8 @@
|
||||
/obj/item/hand
|
||||
name = "hand of cards"
|
||||
desc = "Some playing cards."
|
||||
icon = 'icons/obj/playing_cards_ch.dmi' //CHOMPEDIT quickest solution to having custom chomp cards - Jack
|
||||
description_info = "Alt click to remove a card, Ctrl click to discard cards."
|
||||
icon = 'icons/obj/playing_cards.dmi'
|
||||
icon_state = "empty"
|
||||
drop_sound = 'sound/items/drop/paper.ogg'
|
||||
pickup_sound = 'sound/items/pickup/paper.ogg'
|
||||
@@ -465,3 +513,11 @@
|
||||
/obj/item/hand/pickup(mob/user)
|
||||
..()
|
||||
src.update_icon()
|
||||
|
||||
/obj/item/hand/CtrlClick(mob/user)
|
||||
if(user.stat || !Adjacent(user))
|
||||
return
|
||||
discard()
|
||||
|
||||
/obj/item/hand/AltClick(mob/user)
|
||||
Removecard()
|
||||
|
||||
@@ -5,19 +5,16 @@
|
||||
|
||||
/obj/item/deck/casino
|
||||
w_class = ITEMSIZE_SMALL
|
||||
icon = 'icons/obj/playing_cards_ch.dmi'
|
||||
cooldown = 0 // to prevent spam shuffle
|
||||
|
||||
/obj/item/deck/holder/casino //WIP In future do a cool holder
|
||||
name = "card box"
|
||||
desc = "A small leather case to show how classy you are compared to everyone else."
|
||||
icon = 'icons/obj/playing_cards_ch.dmi'
|
||||
icon_state = "card_holder"
|
||||
|
||||
/obj/item/deck/cards/casino
|
||||
name = "deck of casino cards"
|
||||
desc = "A deck of playing cards from the golden goose casino, comes without a joker card!"
|
||||
icon = 'icons/obj/playing_cards_ch.dmi'
|
||||
icon_state = "casino_deck"
|
||||
|
||||
/obj/item/deck/cards/casino/Initialize(mapload)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
..()
|
||||
if(cheater)
|
||||
if(!loaded)
|
||||
var/to_weight = tgui_input_number(user, "What should the [name] be weighted towards?","Set the desired result", 1, 6, 1)
|
||||
var/to_weight = tgui_input_number(user, "What should the [name] be weighted towards?","Set the desired result", 1, sides, 1)
|
||||
if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides) ) //You must input a number higher than 0 and no greater than the number of sides
|
||||
return 0
|
||||
else
|
||||
@@ -115,6 +115,33 @@
|
||||
span_notice("You throw [src]. It lands on a [result]. [comment]"), \
|
||||
span_notice("You hear [src] landing on a [result]. [comment]"))
|
||||
|
||||
/obj/item/dice/verb/set_dice_verb()
|
||||
set category = "Object"
|
||||
set name = "Set Face"
|
||||
set desc = "Turn the dice to a specific face."
|
||||
set src in view(1)
|
||||
|
||||
var/mob/living/carbon/user = usr
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
set_dice(user)
|
||||
|
||||
/obj/item/dice/proc/set_dice(mob/user)
|
||||
if(user.stat || !Adjacent(user))
|
||||
return
|
||||
var/to_value = tgui_input_number(user, "What face should \the [src] be turned to?","Set die face", 1, sides, 1)
|
||||
if(!to_value)
|
||||
return
|
||||
|
||||
result = to_value
|
||||
icon_state = "[name][result]"
|
||||
user.visible_message(span_notice("\The [user] turned \the [src] to the face reading [result] manually."))
|
||||
|
||||
/obj/item/dice/CtrlClick(mob/user)
|
||||
set_dice(user)
|
||||
|
||||
|
||||
/*
|
||||
* Dice packs
|
||||
*/
|
||||
|
||||
@@ -739,6 +739,9 @@
|
||||
var/obj/item/I = locate(href_list["lookitem_desc_only"])
|
||||
if(!I)
|
||||
return
|
||||
if(istype(I,/obj/item/hand))
|
||||
to_chat(usr,span_warning("You can't see the card faces from here."))
|
||||
return
|
||||
usr.examinate(I, 1)
|
||||
|
||||
if (href_list["lookmob"])
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB |
@@ -4919,6 +4919,11 @@
|
||||
#include "interface\interface.dm"
|
||||
#include "interface\stylesheet.dm"
|
||||
#include "interface\skin.dmf"
|
||||
#include "interface\fonts\fonts_datum.dm"
|
||||
#include "interface\fonts\grand_9k.dm"
|
||||
#include "interface\fonts\pixellari.dm"
|
||||
#include "interface\fonts\tiny_unicode.dm"
|
||||
#include "interface\fonts\vcr_osd_mono.dm"
|
||||
#include "maps\common\common_areas.dm"
|
||||
#include "maps\common\common_defines.dm"
|
||||
#include "maps\common\common_shuttles.dm"
|
||||
@@ -4935,11 +4940,6 @@
|
||||
#include "maps\groundbase\groundbase_telecomm_defs.dm"
|
||||
#include "maps\groundbase\groundbase_wilds.dm"
|
||||
#include "maps\offmap_vr\common_offmaps.dm"
|
||||
#include "interface\fonts\fonts_datum.dm"
|
||||
#include "interface\fonts\grand_9k.dm"
|
||||
#include "interface\fonts\pixellari.dm"
|
||||
#include "interface\fonts\tiny_unicode.dm"
|
||||
#include "interface\fonts\vcr_osd_mono.dm"
|
||||
#include "maps\redgate\facility_items.dm"
|
||||
#include "maps\redgate\fantasy_items.dm"
|
||||
#include "maps\redgate\falls\atoll_decals.dm"
|
||||
@@ -5352,10 +5352,10 @@
|
||||
#include "modular_chomp\maps\common_submaps\tyr\tyr_defines.dm"
|
||||
#include "modular_chomp\maps\overmap\aegis_carrier\aegis_objs.dm"
|
||||
#include "modular_chomp\maps\overmap\om_ships\offmap.dm"
|
||||
#include "modular_chomp\maps\overmap\sectors\common_overmap.dm"
|
||||
#include "modular_chomp\maps\overmap\sectors\sectors.dm"
|
||||
#include "modular_chomp\maps\overmap\space_pois\space_areas.dm"
|
||||
#include "modular_chomp\maps\overmap\space_pois\space_pois.dm"
|
||||
#include "modular_chomp\maps\overmap\sectors\common_overmap.dm"
|
||||
#include "modular_chomp\maps\southern_cross\southern_cross_events.dm"
|
||||
#include "modular_chomp\maps\southern_cross\items\encryptionkey_sc.dm"
|
||||
#include "modular_chomp\maps\southern_cross\items\headset_sc.dm"
|
||||
|
||||
Reference in New Issue
Block a user