diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 19dea63f14..2f03c257af 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -153,6 +153,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "Party equipment" group = "Hospitality" +/datum/supply_packs/lasertag + name = "Lasertag equipment" + contains = list(/obj/item/weapon/gun/energy/lasertag/red, + /obj/item/clothing/suit/redtag, + /obj/item/weapon/gun/energy/lasertag/blue, + /obj/item/clothing/suit/bluetag) + containertype = /obj/structure/closet + containername = "Lasertag Closet" + group = "Hospitality" + cost = 20 + /datum/supply_packs/internals name = "Internals crate" contains = list(/obj/item/clothing/mask/gas, @@ -1149,6 +1160,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "Formalwear for the best occasions." group = "Miscellaneous" +/datum/supply_packs/randomised/card_packs + num_contained = 5 + contains = list(/obj/item/weapon/pack/cardemon, + /obj/item/weapon/pack/spaceball, + /obj/item/weapon/deck/holder) + name = "Trading Card Crate" + cost = 10 + containertype = /obj/structure/closet/crate + containername = "cards crate" + group = "Miscellaneous" + /datum/supply_packs/shield_gen contains = list(/obj/item/weapon/circuitboard/shield_gen) name = "Bubble shield generator circuitry" diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 67f5581576..01506f413b 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,19 +1,9 @@ -/obj/machinery/computer/arcade - name = "arcade machine" - desc = "Does not support pinball." - icon = 'icons/obj/computer.dmi' +/obj/machinery/computer/arcade/ + name = "random arcade" + desc = "random arcade machine" icon_state = "arcade" icon_keyboard = null icon_screen = "invaders" - circuit = /obj/item/weapon/circuitboard/arcade - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = 0 - var/blocked = 0 //Player cannot attack/heal while set var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, /obj/item/toy/blink = 2, /obj/item/clothing/under/syndicate/tacticool = 2, @@ -40,28 +30,84 @@ /obj/item/toy/cultsword = 1 ) -/obj/machinery/computer/arcade +/obj/machinery/computer/arcade/New() + ..() + // If it's a generic arcade machine, pick a random arcade + // circuit board for it and make the new machine + if(!circuit) + var/choice = pick(typesof(/obj/item/weapon/circuitboard/arcade) - /obj/item/weapon/circuitboard/arcade) + var/obj/item/weapon/circuitboard/CB = new choice() + new CB.build_path(loc, CB) + qdel(src) + +/obj/machinery/computer/arcade/proc/prizevend() + if(!contents.len) + var/prizeselect = pickweight(prizes) + new prizeselect(src.loc) + + if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit + new /obj/item/clothing/head/syndicatefake(src.loc) + + else + var/atom/movable/prize = pick(contents) + prize.loc = src.loc + +/obj/machinery/computer/arcade/attack_ai(mob/user as mob) + return src.attack_hand(user) + + +/obj/machinery/computer/arcade/emp_act(severity) + if(stat & (NOPOWER|BROKEN)) + ..(severity) + return + var/empprize = null + var/num_of_prizes = 0 + switch(severity) + if(1) + num_of_prizes = rand(1,4) + if(2) + num_of_prizes = rand(0,2) + for(num_of_prizes; num_of_prizes > 0; num_of_prizes--) + empprize = pickweight(prizes) + new empprize(src.loc) + + ..(severity) + +/////////////////// +// BATTLE HERE // +/////////////////// + +/obj/machinery/computer/arcade/battle + name = "arcade machine" + desc = "Does not support Pinball." + icon_state = "arcade" + circuit = /obj/item/weapon/circuitboard/arcade/battle + var/enemy_name = "Space Villian" + var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc + var/player_hp = 30 //Player health/attack points + var/player_mp = 10 + var/enemy_hp = 45 //Enemy health/attack points + var/enemy_mp = 20 + var/gameover = 0 + var/blocked = 0 //Player cannot attack/heal while set var/turtle = 0 -/obj/machinery/computer/arcade/New() +/obj/machinery/computer/arcade/battle/New() ..() var/name_action var/name_part1 var/name_part2 - name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ") + name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ", "Ban ") name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") - name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn") + name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers") src.enemy_name = replacetext((name_part1 + name_part2), "the ", "") src.name = (name_action + name_part1 + name_part2) -/obj/machinery/computer/arcade/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/arcade/attack_hand(mob/user as mob) +/obj/machinery/computer/arcade/battle/attack_hand(mob/user as mob) if(..()) return user.set_machine(src) @@ -85,7 +131,7 @@ onclose(user, "arcade") return -/obj/machinery/computer/arcade/Topic(href, href_list) +/obj/machinery/computer/arcade/battle/Topic(href, href_list) if(..()) return 1 @@ -150,7 +196,7 @@ src.updateUsrDialog() return -/obj/machinery/computer/arcade/proc/arcade_action() +/obj/machinery/computer/arcade/battle/proc/arcade_action() if ((src.enemy_mp <= 0) || (src.enemy_hp <= 0)) if(!gameover) src.gameover = 1 @@ -166,19 +212,11 @@ emagged = 0 else if(!contents.len) feedback_inc("arcade_win_normal") - var/prizeselect = pickweight(prizes) - new prizeselect(src.loc) - - if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun - new /obj/item/projectile/bullet/pistol/cap(src.loc) - - else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit - new /obj/item/clothing/head/syndicatefake(src.loc) + src.prizevend() else feedback_inc("arcade_win_normal") - var/atom/movable/prize = pick(contents) - prize.loc = src.loc + src.prizevend() else if (emagged && (turtle >= 4)) var/boomamt = rand(5,10) @@ -224,7 +262,7 @@ return -/obj/machinery/computer/arcade/emag_act(var/charges, var/mob/user) +/obj/machinery/computer/arcade/battle/emag_act(var/charges, var/mob/user) if(!emagged) temp = "If you die in the game, you die for real!" player_hp = 30 @@ -241,19 +279,780 @@ src.updateUsrDialog() return 1 -/obj/machinery/computer/arcade/emp_act(severity) - if(stat & (NOPOWER|BROKEN)) - ..(severity) - return - var/empprize = null - var/num_of_prizes = 0 - switch(severity) - if(1) - num_of_prizes = rand(1,4) - if(2) - num_of_prizes = rand(0,2) - for(num_of_prizes; num_of_prizes > 0; num_of_prizes--) - empprize = pickweight(prizes) - new empprize(src.loc) - ..(severity) \ No newline at end of file +////////////////////////// +// ORION TRAIL HERE // +////////////////////////// +#define ORION_TRAIL_WINTURN 9 + +//Orion Trail Events +#define ORION_TRAIL_RAIDERS "Raiders" +#define ORION_TRAIL_FLUX "Interstellar Flux" +#define ORION_TRAIL_ILLNESS "Illness" +#define ORION_TRAIL_BREAKDOWN "Breakdown" +#define ORION_TRAIL_MUTINY "Mutiny?" +#define ORION_TRAIL_MUTINY_ATTACK "Mutinous Ambush" +#define ORION_TRAIL_MALFUNCTION "Malfunction" +#define ORION_TRAIL_COLLISION "Collision" +#define ORION_TRAIL_SPACEPORT "Spaceport" +#define ORION_TRAIL_BLACKHOLE "BlackHole" + +#define ORION_STATUS_START 1 +#define ORION_STATUS_NORMAL 2 +#define ORION_STATUS_GAMEOVER 3 +#define ORION_STATUS_MARKET 4 + +/obj/machinery/computer/arcade/orion_trail + name = "The Orion Trail" + desc = "Imported straight fron station-TG!" + icon_state = "arcade" + circuit = /obj/item/weapon/circuitboard/arcade/orion_trail + var/busy = 0 //prevent clickspam that allowed people to ~speedrun~ the game. + var/engine = 0 + var/hull = 0 + var/electronics = 0 + var/food = 80 + var/fuel = 60 + var/turns = 4 + var/alive = 4 + var/eventdat = null + var/event = null + var/list/settlers = list("Harry","Larry","Bob") + var/list/events = list(ORION_TRAIL_RAIDERS = 3, + ORION_TRAIL_FLUX = 1, + ORION_TRAIL_ILLNESS = 3, + ORION_TRAIL_BREAKDOWN = 2, + ORION_TRAIL_MUTINY = 3, + ORION_TRAIL_MALFUNCTION = 2, + ORION_TRAIL_COLLISION = 1, + ORION_TRAIL_SPACEPORT = 2 + ) + var/list/stops = list() + var/list/stopblurbs = list() + var/traitors_aboard = 0 + var/spaceport_raided = 0 + var/spaceport_freebie = 0 + var/last_spaceport_action = "" + var/gameStatus = ORION_STATUS_START + var/canContinueEvent = 0 + +/obj/machinery/computer/arcade/orion_trail/New() + ..() + // Sets up the main trail + stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + stopblurbs = list( + "Pluto, long since occupied with long-range sensors and scanners, stands ready to, and indeed continues to probe the far reaches of the galaxy.", + "At the edge of the Sol system lies a treacherous asteroid belt. Many have been crushed by stray asteroids and misguided judgement.", + "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now a low-population sanctuary for adventurers and traders.", + "This region of space is particularly devoid of matter. Such low-density pockets are known to exist, but the vastness of it is astounding.", + "Rigel Prime, the center of the Rigel system, burns hot, basking its planetary bodies in warmth and radiation.", + "Tau Ceti Beta has recently become a waypoint for colonists headed towards Orion. There are many ships and makeshift stations in the vicinity.", + "Sensors indicate that a black hole's gravitational field is affecting the region of space we were headed through. We could stay of course, but risk of being overcome by its gravity, or we could change course to go around, which will take longer.", + "You have come into range of the first man-made structure in this region of space. It has been constructed not by travellers from Sol, but by colonists from Orion. It stands as a monument to the colonists' success.", + "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" + ) + +/obj/machinery/computer/arcade/orion_trail/proc/newgame() + // Set names of settlers in crew + settlers = list() + for(var/i = 1; i <= 3; i++) + add_crewmember() + add_crewmember("[usr]") + // Re-set items to defaults + engine = 1 + hull = 1 + electronics = 1 + food = 80 + fuel = 60 + alive = 4 + turns = 1 + event = null + gameStatus = ORION_STATUS_NORMAL + traitors_aboard = 0 + + //spaceport junk + spaceport_raided = 0 + spaceport_freebie = 0 + last_spaceport_action = "" + +/obj/machinery/computer/arcade/orion_trail/attack_hand(mob/user) + if(..()) + return + if(fuel <= 0 || food <=0 || settlers.len == 0) + gameStatus = ORION_STATUS_GAMEOVER + event = null + user.set_machine(src) + var/dat = "" + if(gameStatus == ORION_STATUS_GAMEOVER) + dat = "
Crew Management:
" + + //Buy crew + if(food >= 10 && fuel >= 10) + eventdat += "Hire a new Crewmember (-10FU,-10FO)
" + else + eventdat += "Cant afford a new Crewmember
" + + //Sell crew + if(settlers.len > 1) + eventdat += "Sell crew for Fuel and Food (+7FU,+7FO)
" + else + eventdat += "Cant afford to sell a Crewmember
" + + //BUY/SELL STUFF + eventdat += "Spare Parts:
" + + //Engine parts + if(fuel > 5) + eventdat += "" + else + eventdat += "Cant afford to buy Engine Parts" + + //Hull plates + if(fuel > 5) + eventdat += "
" + else + eventdat += "Cant afford to buy Hull Plates" + + //Electronics + if(fuel > 5) + eventdat += "
" + else + eventdat += "Cant afford to buy Spare Electronics" + + //Trade + if(fuel > 5) + eventdat += "
Trade Fuel for Food (-5FU,+5FO)
" + else + eventdat += "Cant afford to Trade Fuel for Food
5) + eventdat += "Trade Food for Fuel (+5FU,-5FO)
" + else + eventdat += "Cant afford to Trade Food for Fuel
!! Raid Spaceport !!" + + eventdat += "" + + +/obj/machinery/computer/arcade/orion_trail/proc/add_crewmember(var/specific = "") + var/newcrew = "" + if(specific) + newcrew = specific + else + if(prob(50)) + newcrew = pick(first_names_male) + else + newcrew = pick(first_names_female) + if(newcrew) + settlers += newcrew + alive++ + return newcrew + +/obj/machinery/computer/arcade/orion_trail/proc/remove_crewmember(var/specific = "", var/dont_remove = "") + var/list/safe2remove = settlers + var/removed = "" + if(dont_remove) + safe2remove -= dont_remove + if(specific && specific != dont_remove) + safe2remove = list(specific) + else + removed = pick(safe2remove) + + if(removed) + if(traitors_aboard && prob(40*traitors_aboard)) //if there are 2 traitors you're twice as likely to get one, obviously + traitors_aboard = max(0,--traitors_aboard) + settlers -= removed + alive-- + return removed + + +/obj/machinery/computer/arcade/orion_trail/proc/win() + gameStatus = ORION_STATUS_START + src.visible_message("\The [src] plays a triumpant tune, stating 'CONGRATULATIONS, YOU HAVE MADE IT TO ORION.'") + if(emagged) + new /obj/item/weapon/orion_ship(src.loc) + message_admins("[key_name_admin(usr)] made it to Orion on an emagged machine and got an explosive toy ship.") + log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.") + else + prizevend() + emagged = 0 + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + +/obj/machinery/computer/arcade/orion_trail/emag_act(mob/user) + if(!emagged) + user << "You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode." + name = "The Orion Trail: Realism Edition" + desc = "Learn how our ancestors got to Orion, and try not to die in the process!" + newgame() + emagged = 1 + + +/obj/item/weapon/orion_ship + name = "model settler ship" + desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." + icon = 'icons/obj/toy.dmi' + icon_state = "ship" + w_class = 2 + var/active = 0 //if the ship is on + +/obj/item/weapon/orion_ship/examine(mob/user) + ..() + if(!(in_range(user, src))) + return + if(!active) + user << "There's a little switch on the bottom. It's flipped down." + else + user << "There's a little switch on the bottom. It's flipped up." + +/obj/item/weapon/orion_ship/attack_self(mob/user) + if(active) + return + + message_admins("[key_name_admin(usr)] primed an explosive Orion ship for detonation.") + log_game("[key_name(usr)] primed an explosive Orion ship for detonation.") + + user << "You flip the switch on the underside of [src]." + active = 1 + src.visible_message("[src] softly beeps and whirs to life!") + src.audible_message("\The [src] says, 'This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.'") + sleep(20) + src.visible_message("[src] begins to vibrate...") + src.audible_message("\The [src] says, 'Uh, Port? Having some issues with our reactor, could you check it out? Over.'") + sleep(30) + src.audible_message("\The [src] says, 'Oh, God! Code Eight! CODE EIGHT! IT'S GONNA BL-'") + sleep(3.6) + src.visible_message("[src] explodes!") + explosion(src.loc, 1,2,4) + qdel(src) + +#undef ORION_TRAIL_WINTURN +#undef ORION_TRAIL_RAIDERS +#undef ORION_TRAIL_FLUX +#undef ORION_TRAIL_ILLNESS +#undef ORION_TRAIL_BREAKDOWN +#undef ORION_TRAIL_MUTINY +#undef ORION_TRAIL_MUTINY_ATTACK +#undef ORION_TRAIL_MALFUNCTION +#undef ORION_TRAIL_COLLISION +#undef ORION_TRAIL_SPACEPORT +#undef ORION_TRAIL_BLACKHOLE + +#undef ORION_STATUS_START +#undef ORION_STATUS_NORMAL +#undef ORION_STATUS_GAMEOVER +#undef ORION_STATUS_MARKET \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/computer/computer.dm b/code/game/objects/items/weapons/circuitboards/computer/computer.dm index 0bc090f996..0023606062 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/computer.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/computer.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/message_monitor @@ -60,11 +60,11 @@ /obj/item/weapon/circuitboard/stationalert_engineering name = T_BOARD("station alert console (engineering)") build_path = /obj/machinery/computer/station_alert - + /obj/item/weapon/circuitboard/stationalert_security name = T_BOARD("station alert console (security)") build_path = /obj/machinery/computer/station_alert - + /obj/item/weapon/circuitboard/stationalert_all name = T_BOARD("station alert console (all)") build_path = /obj/machinery/computer/station_alert/all @@ -92,9 +92,14 @@ build_path = /obj/machinery/computer/cloning origin_tech = list(TECH_DATA = 3, TECH_BIO = 3) -/obj/item/weapon/circuitboard/arcade - name = T_BOARD("arcade machine") - build_path = /obj/machinery/computer/arcade +/obj/item/weapon/circuitboard/arcade/battle + name = T_BOARD("battle arcade machine") + build_path = /obj/machinery/computer/arcade/battle + origin_tech = list(TECH_DATA = 1) + +/obj/item/weapon/circuitboard/arcade/orion_trail + name = T_BOARD("orion trail arcade machine") + build_path = /obj/machinery/computer/arcade/orion_trail origin_tech = list(TECH_DATA = 1) /obj/item/weapon/circuitboard/turbine_control diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index d4f16f72e4..2122d869f9 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -139,6 +139,7 @@ new /obj/item/weapon/storage/backpack/cultpack (src) new /obj/item/weapon/storage/fancy/candle_box(src) new /obj/item/weapon/storage/fancy/candle_box(src) + new /obj/item/weapon/deck/tarot(src) return diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 06e7005071..12a50e5471 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -1479,7 +1479,31 @@ var/global/list/gear_datums = list() /datum/gear/cards display_name = "deck of cards" - path = /obj/item/weapon/deck + path = /obj/item/weapon/deck/cards + sort_category = "misc" + cost = 1 + +/datum/gear/tarot + display_name = "deck of tarot cards" + path = /obj/item/weapon/deck/tarot + sort_category = "misc" + cost = 1 + +/datum/gear/holder + display_name = "card holder" + path = /obj/item/weapon/deck/holder + sort_category = "misc" + cost = 1 + +/datum/gear/cardemon_pack + display_name = "Cardemon booster pack" + path = /obj/item/weapon/pack/cardemon + sort_category = "misc" + cost = 1 + +/datum/gear/spaceball_pack + display_name = "Spaceball booster pack" + path = /obj/item/weapon/pack/spaceball sort_category = "misc" cost = 1 @@ -1622,4 +1646,4 @@ var/global/list/gear_datums = list() /datum/gear/skrell_cloth_female/pink display_name = "skrell headtail-wear, female, pink, cloth" - path = /obj/item/clothing/ears/skrell/cloth_female/pink \ No newline at end of file + path = /obj/item/clothing/ears/skrell/cloth_female/pink diff --git a/code/modules/games/cardemon.dm b/code/modules/games/cardemon.dm new file mode 100644 index 0000000000..647b1ff8c7 --- /dev/null +++ b/code/modules/games/cardemon.dm @@ -0,0 +1,30 @@ +/obj/item/weapon/pack/cardemon + name = "cardemon booster pack" + desc = "Finally! A children's card game in space!" + icon_state = "card_pack_cardemon" + +/obj/item/weapon/pack/cardemon/New() + var/datum/playingcard/P + var/i + for(i=0; i<5; i++) + var/rarity + if(prob(10)) + if(prob(5)) + if(prob(5)) + rarity = "Plasteel" + else + rarity = "Platinum" + else + rarity = "Silver" + + var/nam = pick("Death","Life","Plant","Leaf","Air","Earth","Fire","Water","Killer","Holy", "God", "Ordinary","Demon","Angel", "Plasteel", "Phoron", "Mad", "Insane", "Metal", "Steel", "Secret") + var/nam2 = pick("Carp", "Corgi", "Cat", "Mouse", "Octopus", "Lizard", "Monkey", "Plant", "Duck", "Demon", "Spider", "Bird", "Slime", "Sheep", "Fish") + + P = new() + P.name = "[nam] [nam2]" + P.card_icon = "card_cardemon" + if(rarity) + P.name = "[rarity] [P.name]" + P.card_icon += "_[rarity]" + P.back_icon = "card_back_cardemon" + cards += P \ No newline at end of file diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 6ff5f22f20..368bfdd9a5 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -1,17 +1,24 @@ /datum/playingcard var/name = "playing card" var/card_icon = "card_back" + var/back_icon = "card_back" /obj/item/weapon/deck - name = "deck of cards" - desc = "A simple deck of playing cards." - icon = 'icons/obj/playing_cards.dmi' - icon_state = "deck" w_class = 2 - + icon = 'icons/obj/playing_cards.dmi' var/list/cards = list() -/obj/item/weapon/deck/New() +/obj/item/weapon/deck/holder + name = "card box" + desc = "A small leather case to show how classy you are compared to everyone else." + icon_state = "card_holder" + +/obj/item/weapon/deck/cards + name = "deck of cards" + desc = "A simple deck of playing cards." + icon_state = "deck" + +/obj/item/weapon/deck/cards/New() ..() var/datum/playingcard/P @@ -27,12 +34,14 @@ 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 @@ -48,7 +57,7 @@ for(var/datum/playingcard/P in H.cards) cards += P qdel(O) - user << "You place your cards on the bottom of the deck." + user << "You place your cards on the bottom of \the [src]." return ..() @@ -128,12 +137,12 @@ /obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob) if(istype(O,/obj/item/weapon/hand)) var/obj/item/weapon/hand/H = O - for(var/datum/playingcard/P in H.cards) - cards += P - src.concealed = H.concealed - qdel(O) - user.put_in_hands(src) - update_icon() + for(var/datum/playingcard/P in cards) + H.cards += P + H.concealed = src.concealed + user.drop_from_inventory(src,user.loc) + qdel(src) + H.update_icon() return ..() @@ -159,6 +168,28 @@ deal_at(usr, over) +/obj/item/weapon/pack/ + name = "Card Pack" + desc = "For those with disposible income." + + icon_state = "card_pack" + icon = 'icons/obj/playing_cards.dmi' + w_class = 1 + var/list/cards = list() + + +/obj/item/weapon/pack/attack_self(var/mob/user as mob) + user.visible_message("[user] rips open \the [src]!") + var/obj/item/weapon/hand/H = new() + + H.cards += cards + cards.Cut(); + user.drop_item() + qdel(src) + + H.update_icon() + user.put_in_active_hand(H) + /obj/item/weapon/hand name = "hand of cards" desc = "Some playing cards." @@ -226,7 +257,7 @@ if(cards.len == 1) var/datum/playingcard/P = cards[1] - var/image/I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") ) + var/image/I = new(src.icon, (concealed ? "[P.back_icon]" : "[P.card_icon]") ) I.pixel_x += (-5+rand(10)) I.pixel_y += (-5+rand(10)) overlays += I @@ -249,7 +280,7 @@ M.Translate(-2, 0) var/i = 0 for(var/datum/playingcard/P in cards) - var/image/I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") ) + var/image/I = new(src.icon, (concealed ? "[P.back_icon]" : "[P.card_icon]") ) //I.pixel_x = origin+(offset*i) switch(direction) if(SOUTH) diff --git a/code/modules/games/spaceball_cards.dm b/code/modules/games/spaceball_cards.dm new file mode 100644 index 0000000000..a65cea598a --- /dev/null +++ b/code/modules/games/spaceball_cards.dm @@ -0,0 +1,23 @@ +/obj/item/weapon/pack/spaceball + name = "spaceball booster pack" + desc = "Officially licensed to take your money." + icon_state = "card_pack_spaceball" + +/obj/item/weapon/pack/spaceball/New() + var/datum/playingcard/P + var/i + var/year = 554 + text2num(time2text(world.timeofday, "YYYY")) + for(i=0;i<5;i++) + P = new() + if(prob(1)) + P.name = "Spaceball Jones, [year] Brickburn Galaxy Trekers" + P.card_icon = "spaceball_jones" + else + var/language_type = pick(/datum/language/human,/datum/language/diona,/datum/language/tajaran,/datum/language/unathi) + var/datum/language/L = new language_type() + var/team = pick("Brickburn Galaxy Trekers","Mars Rovers", "Qerrbalak Saints", "Moghes Rockets", "Ahdomai Lightening", "Vir Vixens", "Euphoric-Earth Alligators") + P.name = "[L.get_random_name(pick(MALE,FEMALE))], [year - rand(0,50)] [team]" + P.card_icon = "spaceball_standard" + P.back_icon = "card_back_spaceball" + + cards += P \ No newline at end of file diff --git a/code/modules/games/tarot.dm b/code/modules/games/tarot.dm new file mode 100644 index 0000000000..b8e8618af0 --- /dev/null +++ b/code/modules/games/tarot.dm @@ -0,0 +1,39 @@ +/* this is a playing card deck based off of the Rider-Waite Tarot Deck. +*/ + +/obj/item/weapon/deck/tarot + name = "deck of tarot cards" + desc = "For all your occult needs!" + icon_state = "deck_tarot" + +/obj/item/weapon/deck/tarot/New() + ..() + + var/datum/playingcard/P + for(var/name in list("Fool","Magician","High Priestess","Empress","Emperor","Hierophant","Lovers","Chariot","Strength","Hermit","Wheel of Fortune","Justice","Hanged Man","Death","Temperance","Devil","Tower","Star","Moon","Sun","Judgement","World")) + P = new() + P.name = "[name]" + P.card_icon = "tarot_major" + P.back_icon = "card_back_tarot" + cards += P + for(var/suit in list("wands","pentacles","cups","swords")) + + + for(var/number in list("ace","two","three","four","five","six","seven","eight","nine","ten","page","knight","queen","king")) + P = new() + P.name = "[number] of [suit]" + P.card_icon = "tarot_[suit]" + P.back_icon = "card_back_tarot" + cards += P + +/obj/item/weapon/deck/tarot/attack_self(var/mob/user as mob) + var/list/newcards = list() + while(cards.len) + var/datum/playingcard/P = pick(cards) + P.name = replacetext(P.name," reversed","") + if(prob(50)) + P.name += " reversed" + newcards += P + cards -= P + cards = newcards + user.visible_message("\The [user] shuffles [src].") \ No newline at end of file diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index c3abc66cb2..4444512149 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -743,10 +743,17 @@ CIRCUITS BELOW desc = "Allows for the construction of \a [item_name] circuit board." /datum/design/circuit/arcademachine - name = "arcade machine" + name = "battle arcade machine" id = "arcademachine" req_tech = list(TECH_DATA = 1) - build_path = /obj/item/weapon/circuitboard/arcade + build_path = /obj/item/weapon/circuitboard/arcade/battle + sort_string = "MAAAA" + +/datum/design/circuit/oriontrail + name = "orion trail arcade machine" + id = "oriontrail" + req_tech = list(TECH_DATA = 1) + build_path = /obj/item/weapon/circuitboard/arcade/orion_trail sort_string = "MAAAA" /datum/design/circuit/seccamera diff --git a/icons/obj/playing_cards.dmi b/icons/obj/playing_cards.dmi index 47b5b3e745..a5fa632cb3 100644 Binary files a/icons/obj/playing_cards.dmi and b/icons/obj/playing_cards.dmi differ diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index e918f5ec62..37785865d1 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ diff --git a/polaris.dme b/polaris.dme index 6281ef5668..dbd0433fe7 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1180,7 +1180,10 @@ #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" #include "code\modules\food\recipes_microwave.dm" +#include "code\modules\games\cardemon.dm" #include "code\modules\games\cards.dm" +#include "code\modules\games\spaceball_cards.dm" +#include "code\modules\games\tarot.dm" #include "code\modules\genetics\side_effects.dm" #include "code\modules\ghosttrap\trap.dm" #include "code\modules\holodeck\HolodeckControl.dm"