diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index a0e76685c5f..159817e531f 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -168,43 +168,71 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob) user << "Charge card's owner: [src.owner_name]. Credit chips remaining: [src.worth]." /obj/item/weapon/spacecash/ewallet/lotto - name = "lottery card" - desc = "A scratch-action charge card that contains a variable amount of money." + name = "space lottery card" + desc = "A virtual scratch-action charge card that contains a variable amount of money." worth = 0 - var/scratched = 0 + var/scratches_remaining = 3 + var/next_scratch = 0 /obj/item/weapon/spacecash/ewallet/lotto/attack_self(mob/user) - if(!scratched) - user << "You initiate the simulated scratch action process on the charge card..." - if(do_after(user,5)) - var/result = rand(1,10000) - if(result <= 5000) // 50% chance to not earn anything at all. - worth = 0 - user << "The card reads [worth]. Not your lucky day!" - else if (result <= 8000) // 30% chance to break even. - worth = 200 - user << "The card reads [worth]. At least you broke even..." - else if (result <= 9000) // 10% chance to earn 500 credits - worth = 500 - user << "The card reads [worth]. You doubled your money!" - else if (result <= 9500) // 5% chance to earn 1000 credits. - worth = 1000 - user << "The card reads [worth]. Wow, you're lucky!" - else if (result <= 9750) // 2.5% chance to earn 2500 credits. - worth = 2500 - user << "The card reads [worth]. Wow, your luck is running high!" - else if (result <= 9900) // 1.5% chance to earn 5000 credits. - worth = 5000 - user << "The card reads [worth]. Wow, you're rich!" - else if (result <= 9950) // 0.5% chance to earn 10000 credits - worth = 10000 - user << "The card reads [worth]. Wow, your're super rich!" - else if (result <= 9975) // 0.25% chance to earn 50000 credits. - worth = 25000 - user << "The card reads [worth]. Wow, your're super rich!" - else // 0.25% chance to earn 100000 credits. - user << "The card reads [worth]. YOU HIT THE JACKPOT!" - worth = 50000 - scratched = 1 - owner_name = user.name + if(scratches_remaining <= 0) + user << "The card flashes: \"No scratches remaining!\"" + return + + if(next_scratch > world.time) + user << "The card flashes: \"Please wait!\"" + return + + next_scratch = world.time + 6 SECONDS + + user << "You initiate the simulated scratch action process on the [src]..." + playsound(src.loc, 'sound/items/drumroll.ogg', 50, 0, 0) + if(do_after(user,4.5 SECONDS)) + var/won = 0 + var/result = rand(1,10000) + if(result <= 4000) // 40% chance to not earn anything at all. + won = 0 + speak("You've won: [won] CREDITS. Better luck next time!") + else if (result <= 8000) // 40% chance + won = 50 + speak("You've won: [won] CREDITS. Partial winner!") + else if (result <= 9000) // 10% chance + won = 100 + speak("You've won: [won] CREDITS. Winner!") + else if (result <= 9500) // 5% chance + won = 200 + speak("You've won: [won] CREDITS. SUPER WINNER! You're lucky!") + else if (result <= 9750) // 2.5% chance + won = 500 + speak("You've won: [won] CREDITS. MEGA WINNER! You're super lucky!") + else if (result <= 9900) // 1.5% chance + won = 1000 + speak("You've won: [won] CREDITS. ULTRA WINNER! You're mega lucky!") + else if (result <= 9950) // 0.5% chance + won = 2500 + speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!") + else if (result <= 9975) // 0.25% chance + won = 5000 + speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!") + else if (result <= 9999) // 0.24% chance + won = 10000 + speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!") + else ///0.01% chance + won = 25000 + speak("You've won: [won] CREDITS. JACKPOT WINNER! You're JACKPOT lucky!") + + scratches_remaining -= 1 + worth += won + sleep(1 SECONDS) + if(scratches_remaining > 0) + user << "The card flashes: You have: [scratches_remaining] SCRATCHES remaining! Scratch again!" + else + user << "The card flashes: You have: [scratches_remaining] SCRATCHES remaining! You won a total of: [worth] CREDITS. Thanks for playing the space lottery!" + + owner_name = user.name + +/obj/item/weapon/spacecash/ewallet/lotto/proc/speak(var/message = "Hello!") + for(var/mob/O in hearers(src.loc, null)) + O.show_message("\The [src] pings, \"[message]\"",2) + playsound(src.loc, 'sound/machines/ping.ogg', 50, 1, -4) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index a5ea463b6b9..7d9b68baf4b 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -1561,7 +1561,7 @@ . = ..() reagents.add_reagent("protein", 4) reagents.add_reagent("msg", 2) - reagents.add_reagent("palmoil", 1) + reagents.add_reagent("sodiumchloride", 4) bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/no_raisin @@ -1578,7 +1578,6 @@ . = ..() reagents.add_reagent("msg", 1) reagents.add_reagent("hfcs", 1) - reagents.add_reagent("palmoil", 1) bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/spacetwinkie @@ -1611,7 +1610,7 @@ . = ..() reagents.add_reagent("cheese", 3) reagents.add_reagent("palmoil", 1) - reagents.add_reagent("msg", 2) + reagents.add_reagent("msg", 1) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/syndicake @@ -4398,21 +4397,18 @@ /obj/item/weapon/reagent_containers/food/snacks/tastybread name = "bread tube" - desc = "Bread in a tube. Chewy...and questionably tasty." + desc = "Bread in a tube. Chewy." icon_state = "tastybread" trash = /obj/item/trash/tastybread filling_color = "#A66829" center_of_mass = list("x"=17, "y"=16) - nutriment_desc = list("tasty bread" = 4) + nutriment_desc = list("stale bread" = 4) //NO LONGER TASTY BECAUSE OF REMOVED FLAVORINGS. ENJOY EATING STALE BREAD FUCKERS. HAHAHAHAHA. nutriment_amt = 4 /obj/item/weapon/reagent_containers/food/snacks/tastybread/Initialize() . = ..() reagents.add_reagent("shortening", 1) - reagents.add_reagent("palmoil", 1) - reagents.add_reagent("sugar", 1) - reagents.add_reagent("msg", 4) - reagents.add_reagent("sodiumchloride", 2) + reagents.add_reagent("sodiumchloride", 4) bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks @@ -4426,7 +4422,6 @@ /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks/Initialize() . = ..() - reagents.add_reagent("shortening", 2) bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/friedkois @@ -4559,7 +4554,7 @@ . = ..() reagents.add_reagent("protein", 10) reagents.add_reagent("shortening", 1) - reagents.add_reagent("msg", 4) + reagents.add_reagent("msg", 3) reagents.add_reagent("sodiumchloride", 3) bitesize = 5 @@ -4589,7 +4584,7 @@ . = ..() reagents.add_reagent("protein", 10) reagents.add_reagent("iron", 3) - reagents.add_reagent("msg", 4) + reagents.add_reagent("msg", 5) reagents.add_reagent("sodiumchloride", 5) bitesize = 4 diff --git a/html/changelogs/burgerbb-junkfoodtweak.yml b/html/changelogs/burgerbb-junkfoodtweak.yml new file mode 100644 index 00000000000..bc5c18b4c82 --- /dev/null +++ b/html/changelogs/burgerbb-junkfoodtweak.yml @@ -0,0 +1,7 @@ +author: BurgerBB + +delete-after: True + +changes: + - balance: "Made junkfood bread and rasins healthier. Made light junkfood snacks slightly healthier." + - balance: "Lottery cards now generally give less, have 3 scratches per card, and take longer to scratch." diff --git a/sound/items/drumroll.ogg b/sound/items/drumroll.ogg new file mode 100644 index 00000000000..4521edd76ed Binary files /dev/null and b/sound/items/drumroll.ogg differ