From 4f241fd22c62f311e57c8d96ce09d664125ca2ed Mon Sep 17 00:00:00 2001 From: Kearel Date: Sun, 22 Nov 2015 20:23:31 -0600 Subject: [PATCH] Reworked Orion Trail Plays a bit differently. Slightly more challenging but still beatable with proper strategies in use. --- code/game/antagonist/outsider/actors.dm | 2 +- code/game/machinery/computer/arcade.dm | 1074 +++++++++-------------- code/modules/client/preferences_gear.dm | 4 +- code/modules/games/cardemon.dm | 2 +- code/modules/games/cards.dm | 2 +- code/modules/games/spaceball_cards.dm | 2 +- code/modules/research/designs.dm | 2 +- html/changelogs/TheWelp-fluff2.yml | 9 + 8 files changed, 425 insertions(+), 672 deletions(-) create mode 100644 html/changelogs/TheWelp-fluff2.yml diff --git a/code/game/antagonist/outsider/actors.dm b/code/game/antagonist/outsider/actors.dm index 52089b34175..013d7348fb4 100644 --- a/code/game/antagonist/outsider/actors.dm +++ b/code/game/antagonist/outsider/actors.dm @@ -46,7 +46,7 @@ var/datum/antagonist/actor/actor set desc = "Join as an Actor to entertain the crew through television!" if(!MayRespawn(1)) - usr << "You cannot respawn as an actor at this time." + return if(istype(usr,/mob/dead/observer) || istype(usr,/mob/new_player)) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 4a57a93721c..638ed6610a7 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -283,41 +283,41 @@ ////////////////////////// // 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_TRAIL_RAIDERS "Vox 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_DISASTER "Disaster" +#define ORION_TRAIL_SPACEPORT_RAIDED "Raided Spaceport" +#define ORION_TRAIL_DERELICT "Derelict Spacecraft" +#define ORION_TRAIL_CARP "Carp Migration" +#define ORION_TRAIL_STUCK "Stuck!" +#define ORION_TRAIL_START "Start" +#define ORION_TRAIL_GAMEOVER "Gameover!" + + +#define ORION_VIEW_MAIN 0 +#define ORION_VIEW_SUPPLIES 1 +#define ORION_VIEW_CREW 2 -#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" + name = "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/supplies = list("1" = 0, "2" = 0, "3" = 0, "4" = 0, "5" = 0, "6" = 0) //engine,hull,electronics,food,fuel + var/list/supply_cost = list("1" = 1000, "2" = 950, "3" = 1100, "4" = 75, "5" = 100) + var/list/supply_name = list("1" = "engine parts", "2" = "hull parts", "3" = "electronic parts", "4" = "food", "5" = "fuel", "6" = "thalers") + var/list/settlers = list() + var/num_traitors = 0 var/list/events = list(ORION_TRAIL_RAIDERS = 3, ORION_TRAIL_FLUX = 1, ORION_TRAIL_ILLNESS = 3, @@ -325,22 +325,10 @@ ORION_TRAIL_MUTINY = 3, ORION_TRAIL_MALFUNCTION = 2, ORION_TRAIL_COLLISION = 1, - ORION_TRAIL_SPACEPORT = 2 + ORION_TRAIL_CARP = 3 ) - 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( + var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + var/list/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.", @@ -351,637 +339,404 @@ "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!" ) + var/list/stop_distance = list(10000,7000,25000,9000,5000,30000,25000,10000,0) + var/event = null + var/event_title = "" + var/event_desc = "" + var/event_actions = "" + var/event_info = "" + var/distance = 0 + var/port = 0 + var/view = 0 -/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/proc/newgame(var/emag = 0) + name = "orion trail[emag ? ": Realism Edition" : ""]" + supplies = list("1" = 1, "2" = 1, "3" = 1, "4" = 60, "5" = 20, "6" = 5000) + emagged = emag + distance = 0 + settlers = list("[usr]") + for(var/i=0; i<3; i++) + if(prob(50)) + settlers += pick(first_names_male) + else + settlers += pick(first_names_female) + num_traitors = 0 + event = ORION_TRAIL_START + port = 0 + view = ORION_VIEW_MAIN /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 = "

Game Over

" - dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." - if(settlers.len == 0) - dat += "
Your entire crew died, your ship joins the fleet of ghost-ships littering the galaxy." - else - if(food <= 0) - dat += "
You ran out of food and starved." - if(emagged) - user.nutrition = 0 //yeah you pretty hongry - user << "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor." - if(fuel <= 0) - dat += "
You ran out of fuel, and drift, slowly, into a star." - if(emagged) - var/mob/living/M = user - M.adjust_fire_stacks(5) - M.IgniteMob() //flew into a star, so you're on fire - user << "You feel an immense wave of heat emanate from \the [src]. Your skin bursts into flames." - dat += "

OK...

" - - if(emagged) - user << "You're never going to make it to Orion..." - user.death() - emagged = 0 //removes the emagged status after you lose - gameStatus = ORION_STATUS_START - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - - else if(event) - dat = eventdat - else if(gameStatus == ORION_STATUS_NORMAL) - var/title = stops[turns] - var/subtext = stopblurbs[turns] - dat = "

[title]

" - dat += "[subtext]" - dat += "

Crew:

" - dat += english_list(settlers) - dat += "
Food: [food] | Fuel: [fuel]" - dat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" - if(turns == 7) - dat += "

Go Around Continue

" - else - dat += "

Continue

" - dat += "

Kill a crewmember

" - dat += "

Close

" - else - dat = "

The Orion Trail

" - dat += "

Experience the journey of your ancestors!



" - dat += "
New Game
" - dat += "

Close

" - user << browse(dat,"window=arcade") - return - -/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) - if(..()) - return - if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - - if(busy) - return - busy = 1 - - if (href_list["continue"]) //Continue your travels - if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) - if(turns >= ORION_TRAIL_WINTURN) - win() - else - food -= (alive+traitors_aboard)*2 - fuel -= 5 - if(turns == 2 && prob(30)) - event = ORION_TRAIL_COLLISION - event() - else if(prob(75)) - event = pickweight(events) - if(traitors_aboard) - if(event == ORION_TRAIL_MUTINY || prob(55)) - event = ORION_TRAIL_MUTINY_ATTACK - event() - turns += 1 - if(emagged) - var/mob/living/carbon/M = usr //for some vars - switch(event) - if(ORION_TRAIL_RAIDERS) - if(prob(50)) - usr << "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?" - M.hallucination += 30 - else - usr << "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there..." - M.take_organ_damage(25) - if(ORION_TRAIL_ILLNESS) - var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS - if(severity == 1) - M << "You suddenly feel slightly nauseous." //got off lucky - if(severity == 2) - usr << "You suddenly feel extremely nauseous and hunch over until it passes." - M.Stun(3) - if(severity >= 3) //you didn't pray hard enough - M << "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit." - spawn(30) - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - H.vomit() - if(ORION_TRAIL_FLUX) - if(prob(75)) - M.Weaken(3) - src.visible_message("A sudden gust of powerful wind slams \the [M] into the floor!", "You hear a large fwooshing sound, followed by a bang.") - M.take_organ_damage(15) - else - M << "A violent gale blows past you, and you barely manage to stay standing!" - if(ORION_TRAIL_COLLISION) //by far the most damaging event - if(prob(90) && !hull) - var/turf/simulated/floor/F = src.loc - F.ChangeTurf(/turf/space) - src.visible_message("Something slams into the floor around \the [src], exposing it to space!", "You hear something crack and break.") - else - src.visible_message("Something slams into the floor around \the [src] - luckily, it didn't get through!", "You hear something crack.") - if(ORION_TRAIL_MALFUNCTION) - src.visible_message("\The [src] buzzes and the screen goes blank for a moment before returning to the game.") - var/oldfood = food - var/oldfuel = fuel - food = rand(10,80) / rand(1,2) - fuel = rand(10,60) / rand(1,2) - if(electronics) - sleep(10) - if(oldfuel > fuel && oldfood > food) - src.audible_message("\The [src] lets out a somehow reassuring chime.") - else if(oldfuel < fuel || oldfood < food) - src.audible_message("\The [src] lets out a somehow ominous chime.") - food = oldfood - fuel = oldfuel - - else if(href_list["newgame"]) //Reset everything - if(gameStatus == ORION_STATUS_START) - newgame() - else if(href_list["menu"]) //back to the main menu - if(gameStatus == ORION_STATUS_GAMEOVER) - gameStatus = ORION_STATUS_START - event = null - food = 80 - fuel = 60 - settlers = list("Harry","Larry","Bob") - else if(href_list["slow"]) //slow down - if(event == ORION_TRAIL_FLUX) - food -= (alive+traitors_aboard)*2 - fuel -= 5 - event = null - else if(href_list["pastblack"]) //slow down - if(turns == 7) - food -= ((alive+traitors_aboard)*2)*3 - fuel -= 15 - turns += 1 - event = null - else if(href_list["useengine"]) //use parts - if(event == ORION_TRAIL_BREAKDOWN) - engine = max(0, --engine) - event = null - else if(href_list["useelec"]) //use parts - if(event == ORION_TRAIL_MALFUNCTION) - electronics = max(0, --electronics) - event = null - else if(href_list["usehull"]) //use parts - if(event == ORION_TRAIL_COLLISION) - hull = max(0, --hull) - event = null - else if(href_list["wait"]) //wait 3 days - if(event == ORION_TRAIL_BREAKDOWN || event == ORION_TRAIL_MALFUNCTION || event == ORION_TRAIL_COLLISION) - food -= ((alive+traitors_aboard)*2)*3 - event = null - else if(href_list["keepspeed"]) //keep speed - if(event == ORION_TRAIL_FLUX) - if(prob(75)) - event = "Breakdown" - event() - else - event = null - else if(href_list["blackhole"]) //keep speed past a black hole - if(turns == 7) - if(prob(75)) - event = ORION_TRAIL_BLACKHOLE - event() - if(emagged) //has to be here because otherwise it doesn't work - src.show_message("\The [src] states, 'YOU ARE EXPERIENCING A BLACKHOLE. BE TERRIFIED.","You hear something say, 'YOU ARE EXPERIENCING A BLACKHOLE. BE TERRFIED'") - usr << "Something draws you closer and closer to the machine." - sleep(10) - usr << "This is really starting to hurt!" - var i; //spawning a literal blackhole would be fun, but a bit disruptive. - for(i=0;i<4;i++) - var/mob/living/L = usr - if(istype(L)) - L.adjustBruteLoss(25) - sleep(10) - else - event = null - turns += 1 - else if(href_list["holedeath"]) - if(event == ORION_TRAIL_BLACKHOLE) - gameStatus = ORION_STATUS_GAMEOVER - event = null - else if(href_list["eventclose"]) //end an event - if(canContinueEvent) - event = null - - else if(href_list["killcrew"]) //shoot a crewmember - if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_MUTINY) - var/sheriff = remove_crewmember() //I shot the sheriff - var/mob/living/L = usr - if(!istype(L)) + if(event == null) + newgame() + user.set_machine(src) + switch(view) + if(ORION_VIEW_MAIN) + if(event == ORION_TRAIL_START) //new game? New game. + dat = "

Orion Trail[emagged ? ": Realism Edition" : ""]


Learn how our ancestors got to Orion, and have fun in the process!

Start New Game

" + user << browse(dat, "window=arcade") return - if(settlers.len == 0 || alive == 0) - src.visible_message("\The [src] states, 'EVERYONE HAS DIED, GAMEOVER.'", "You hear something state, 'EVERYONE HAS DIED, GAMEOVER.'") - if(emagged) - src.visible_message("\The [src] produces a loud, gunlike sound.") - L.adjustBruteLoss(30) - emagged = 0 - gameStatus = ORION_STATUS_GAMEOVER + else + event_title = event + event_actions = "Continue your journey
" + switch(event) + if(ORION_TRAIL_GAMEOVER) + event_info = "" + event_actions = "Start New Game
" + if(ORION_TRAIL_SPACEPORT) + event_title += ": [stops[port]]" + event_desc = "[stopblurbs[port]]" + event_info = "" + if(port == 9) + event_actions = "Return to the title screen!
" + else + event_actions = "Shove off
" + event_actions += "Raid Spaceport" + if(ORION_TRAIL_SPACEPORT_RAIDED) + event_title += ": [stops[port]]" + event_actions = "Shove off" + if(ORION_TRAIL_RAIDERS) + event_desc = "You arm yourselves as you prepare to fight off the vox menace!" + if(ORION_TRAIL_DERELICT) + event_desc = "You come across an unpowered ship drifting slowly in the vastness of space. Sensors indicate there are no lifeforms aboard." + if(ORION_TRAIL_ILLNESS) + event_desc = "A disease has spread amoungst your crew!" + if(ORION_TRAIL_FLUX) + event_desc = "You've entered a turbulent region. Slowing down would be better for your ship but would cost more fuel." + event_actions = "Continue as normal
" + event_actions += "Take it slow
" + if(ORION_TRAIL_MALFUNCTION) + event_info = "" + event_desc = "The ship's computers are malfunctioning! You can choose to fix it with a part or risk something going awry." + event_actions = "Continue as normal
" + if(supplies["3"] != 0) + event_actions += "Fix using a part.
" + if(ORION_TRAIL_COLLISION) + event_info = "" + event_desc = "Something has hit your ship and breached the hull! You can choose to fix it with a part or risk something going awry." + event_actions = "Continue as normal
" + if(supplies["2"] != 0) + event_actions += "Fix using a part.
" + if(ORION_TRAIL_BREAKDOWN) + event_info = "" + event_desc = "The ship's engines broke down! You can choose to fix it with a part or risk something going awry." + event_actions = "Continue as normal
" + if(supplies["1"] != 0) + event_actions += "Fix using a part.
" + if(ORION_TRAIL_STUCK) + event_desc = "You've ran out of fuel. Your only hope to survive is to get refueled by a passing ship, if there are any." + if(supplies["5"] == 0) + event_actions = "Wait" + if(ORION_TRAIL_CARP) + event_desc = "You've chanced upon a large carp migration! Known both for their delicious meat as well as their bite, you and your crew arm yourselves for a small hunting trip." + if(ORION_TRAIL_MUTINY) + event_desc = "You've been hearing rumors of dissenting opinions and missing items from the armory..." + if(ORION_TRAIL_MUTINY_ATTACK) + event_desc = "Oh no, some of your crew are attempting to mutiny!!" + + dat = "

[event_title]

[event_desc]

Distance to next port: [distance]
[event_info]

[event_actions]" + if(ORION_VIEW_SUPPLIES) + dat = "

Supplies

View your supplies or buy more when at a spaceport.

" + dat += "
You have [supplies["6"]] thalers.
" + for(var/i=1; i<6; i++) + var/amm = (i>3?10:1) + dat += "[supplies["[i]"]] [supply_name["[i]"]][event==ORION_TRAIL_SPACEPORT ? ", buy [amm] for [supply_cost["[i]"]]T" : ""]
" + if(supplies["[i]"] >= amm && event == ORION_TRAIL_SPACEPORT) + dat += "sell [amm] for [supply_cost["[i]"]]T
" + if(ORION_VIEW_CREW) + dat = "

Crew

View the status of your crew.
" + for(var/i=1;i<=settlers.len;i++) + dat += "[settlers[i]] Kill
" + + dat += "

View:
" + dat += "[view==ORION_VIEW_MAIN ? "" : ""]Main[view==ORION_VIEW_MAIN ? "" : ""]
" + dat += "[view==ORION_VIEW_SUPPLIES ? "" : ""]Supplies[view==ORION_VIEW_SUPPLIES ? "" : ""]
" + dat += "[view==ORION_VIEW_CREW ? "" : ""]Crew[view==ORION_VIEW_CREW ? "" : ""]

" + user << browse(dat, "window=arcade") + +/obj/machinery/computer/arcade/orion_trail/Topic(href,href_list) + if(href_list["continue"]) + if(view == ORION_VIEW_MAIN) + var/next_event = null + if(event == ORION_TRAIL_START) + event = ORION_TRAIL_SPACEPORT + if(event == ORION_TRAIL_GAMEOVER) event = null - else if(emagged) - if(usr.name == sheriff) - src.visible_message("\The [src] states, 'THE CREW HAS CHOSEN TO KILL [usr]'. A gunshot can be heard coming from \the [src]", "You hear 'THE CREW HAS CHOSEN TO KILL [usr]' followed by a gunshot") - L.adjustBruteLoss(30) - if(event == ORION_TRAIL_MUTINY) //only ends the ORION_TRAIL_MUTINY event, since you can do this action in multiple places - event = null - - //Spaceport specific interactions - //they get a header because most of them don't reset event (because it's a shop, you leave when you want to) - //they also call event() again, to regen the eventdata, which is kind of odd but necessary - else if(href_list["buycrew"]) //buy a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && food >= 10 && fuel >= 10) - var/bought = add_crewmember() - last_spaceport_action = "You hired [bought] as a new crewmember." - fuel -= 10 - food -= 10 - event() - - else if(href_list["sellcrew"]) //sell a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && settlers.len > 1) - var/sold = remove_crewmember() - last_spaceport_action = "You sold your crewmember, [sold]!" - fuel += 7 - food += 7 - event() - - else if(href_list["leave_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - event = null - gameStatus = ORION_STATUS_NORMAL - spaceport_raided = 0 - spaceport_freebie = 0 - last_spaceport_action = "" - - else if(href_list["raid_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - var/success = min(15 * alive,100) //default crew (4) have a 60% chance - spaceport_raided = 1 - - var/FU = 0 - var/FO = 0 - if(prob(success)) - FU = rand(5,15) - FO = rand(5,15) - last_spaceport_action = "You successfully raided the spaceport! you gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" - else - FU = rand(-5,-15) - FO = rand(-5,-15) - last_spaceport_action = "You failed to raid the spaceport! you lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" - - //your chance of lose a crewmember is 1/2 your chance of success - //this makes higher % failures hurt more, don't get cocky space cowboy! - if(prob(success*5)) - var/lost_crew = remove_crewmember() - last_spaceport_action = "You failed to raid the spaceport! you lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" - if(emagged) - src.visible_message("The machine states, 'YOU ARE UNDER ARREST, RAIDER!' and shoots handcuffs onto [usr]!", "You hear something say 'YOU ARE UNDER ARREST, RAIDER!' and a clinking sound") - var/obj/item/weapon/handcuffs/C = new(src.loc) - var/mob/living/carbon/human/H = usr - if(istype(usr)) - C.forceMove(H) - H.handcuffed = C - H.update_inv_handcuffed() - else - C.throw_at(usr,16,3,src) + src.updateUsrDialog() + return + if(!settlers.len) + event_desc = "You and your crew were killed on the way to Orion, your ship left abandoned for scavengers to find." + next_event = ORION_TRAIL_GAMEOVER + if(port == 9) + win() + return + var/travel = min(rand(1000,10000),distance) + if(href_list["fix"]) + var/item = href_list["fix"] + supplies[item] = max(0, --supplies[item]) + if(href_list["risky"]) + var/risk = text2num(href_list["risky"]) + if(prob(risk)) + next_event = ORION_TRAIL_DISASTER - fuel += FU - food += FO - event() + if(!href_list["food"]) + var/temp = supplies["5"] - travel/1000 * (href_list["slow"] ? 2 : 1) + if(temp < 0 && (distance-travel != 0) && next_event == null) //uh oh. Better start a fuel event. + next_event = ORION_TRAIL_STUCK + travel -= (temp*-1)*1000/(href_list["slow"] ? 2 : 1) + temp = 0 + supplies["5"] = temp - else if(href_list["buyparts"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && fuel > 5) - switch(text2num(href_list["buyparts"])) - if(1) //Engine Parts - engine++ - last_spaceport_action = "Bought Engine Parts" - if(2) //Hull Plates - hull++ - last_spaceport_action = "Bought Hull Plates" - if(3) //Spare Electronics - electronics++ - last_spaceport_action = "Bought Spare Electronics" - fuel -= 5 //they all cost 5 - event() + supplies["4"] = round(supplies["4"] - travel/1000 * settlers.len * (href_list["slow"] ? 2 : 1)) + distance = max(0,distance-travel) + else + supplies["4"] -= settlers.len * 5 + event_info = "You have [supplies["4"]] food left.
" + next_event = ORION_TRAIL_STUCK - else if(href_list["trade"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - switch(text2num(href_list["trade"])) - if(1) //Fuel - if(fuel > 5) - fuel -= 5 - food += 5 - last_spaceport_action = "Traded Fuel for Food" - event() - if(2) //Food - if(food > 5) - fuel += 5 - food -= 5 - last_spaceport_action = "Traded Food for Fuel" - event() + if(supplies["4"] <= 0) + next_event = ORION_TRAIL_GAMEOVER + event_desc = "You and your crew starved to death, never to reach Orion." + supplies["4"] = 0 - src.add_fingerprint(usr) - src.updateUsrDialog() - busy = 0 - return + if(distance == 0 && next_event == null) //POOORT! + port++ + event = ORION_TRAIL_SPACEPORT + distance = stop_distance[port] + //gotta set supply costs. The further out the more expensive it'll generally be + supply_cost = list("1" = rand(500+100*port,1200+100*port), "2" = rand(700+100*port,1000+100*port), "3" = rand(900+50*port,1500+75*port), "4" = rand(10+50*port,125+50*port), "5" = rand(75+25*port,200+100*port)) + else //Event? Event. + generate_event(next_event) + else + view = ORION_VIEW_MAIN + if(href_list["supplies"]) + view = ORION_VIEW_SUPPLIES -/obj/machinery/computer/arcade/orion_trail/proc/event() - eventdat = "

[event]

" - canContinueEvent = 0 - switch(event) - if(ORION_TRAIL_RAIDERS) - eventdat += "Raiders have come aboard your ship!" + if(href_list["crew"]) + view = ORION_VIEW_CREW + + if(href_list["buy"]) + var/item = href_list["buy"] + if(supply_cost["[item]"] <= supplies["6"]) + supplies["[item]"] += (text2num(item) > 3 ? 10 : 1) + supplies["6"] -= supply_cost["[item]"] + + if(href_list["sell"]) + var/item = href_list["sell"] + if(supplies["[item]"] >= (text2num(item) > 3 ? 10 : 1)) + supplies["6"] += supply_cost["[item]"] + supplies["[item]"] -= (text2num(item) > 3 ? 10 : 1) + + if(href_list["kill"]) + var/item = text2num(href_list["kill"]) + remove_settler(item) + + if(href_list["attack"]) + supply_cost = list() + if(prob(17*settlers.len)) + event_desc = "An empty husk of a station now, all its resources stripped for use in your travels." + event_info = "You've successfully raided the spaceport!
" + change_resource(null) + change_resource(null) + else + event_desc = "The local police mobilized too quickly, sirens blare as you barely make it away with your ship intact." + change_resource(null,-1) + change_resource(null,-1) if(prob(50)) - var/sfood = rand(1,10) - var/sfuel = rand(1,10) - food -= sfood - fuel -= sfuel - eventdat += "
They have stolen [sfood] Food and [sfuel] Fuel." - else if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] tried to fight back but was killed." + remove_settler(null, "died while you were escaping!") + if(prob(10)) + remove_settler(null, "died while you were escaping!") + event = ORION_TRAIL_SPACEPORT_RAIDED + src.updateUsrDialog() + +/obj/machinery/computer/arcade/orion_trail/proc/change_resource(var/specific = null, var/add = 1) + if(!specific) + specific = rand(1,6) + var/cost = (specific < 4 ? rand(1,5) : rand(5,100)) * add + cost = round(cost) + if(cost < 0) + cost = max(cost,supplies["[specific]"] * -1) + else + cost = max(cost,1) + supplies["[specific]"] += cost + event_info += "You've [add > 0 ? "gained" : "lost"] [abs(cost)] [supply_name["[specific]"]]
" + +/obj/machinery/computer/arcade/orion_trail/proc/remove_settler(var/specific = null, var/desc = null) + if(!settlers.len) + return + if(!specific) + specific = rand(1,settlers.len) + + event_info += "The crewmember, [settlers[specific]] [desc == null ? "has died!":"[desc]"]
" + settlers -= settlers[specific] + if(num_traitors > 0 && prob(100/max(1,settlers.len-1))) + num_traitors-- + +/obj/machinery/computer/arcade/orion_trail/proc/generate_event(var/specific = null) + if(!specific) + if(prob(20*num_traitors)) + specific = ORION_TRAIL_MUTINY_ATTACK + else + specific = pickweight(events) + + switch(specific) + if(ORION_TRAIL_RAIDERS) + if(prob(17 * settlers.len)) + event_info = "You managed to fight them off!
" + if(prob(5)) + remove_settler(null,"died in the firefight!") + change_resource(rand(4,5)) + change_resource(rand(1,3)) + if(prob(50)) + change_resource(6,1.1) else - eventdat += "
Fortunately you fended them off without any trouble." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_FLUX) - eventdat += "This region of space is highly turbulent.
If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies." - eventdat += "
What will you do?" - eventdat += "

Slow Down Continue

" - eventdat += "

Close

" - - if(ORION_TRAIL_ILLNESS) - eventdat += "A deadly illness has been contracted!" - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by the disease." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_BREAKDOWN) - eventdat += "Oh no! The engine has broken down!" - eventdat += "
You can repair it with an engine part, or you can make repairs for 3 days." - if(engine >= 1) - eventdat += "

Use Part Wait

" + event_info = "You couldn't fight them off!
" + if(prob(10*settlers.len)) + remove_settler(null, "was kidnapped by the Vox!") + change_resource(null,-1) + change_resource(null,-0.5) + if(ORION_TRAIL_DERELICT) + if(prob(60)) + event_info = "You find resources onboard!" + change_resource(rand(1,3)) + change_resource(rand(4,5)) else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_MALFUNCTION) - eventdat += "The ship's systems are malfunctioning!" - eventdat += "
You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI." - if(electronics >= 1) - eventdat += "

Use Part Wait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - + event_info = "You don't find anything onboard..." if(ORION_TRAIL_COLLISION) - eventdat += "Something hit us! Looks like there's some hull damage." - if(prob(25)) - var/sfood = rand(5,15) - var/sfuel = rand(5,15) - food -= sfood - fuel -= sfuel - eventdat += "
[sfood] Food and [sfuel] Fuel was vented out into space." + event_info = "" + event_desc = "You've collided with a passing meteor, breaching your hull!" if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by rapid depressurization." - eventdat += "
You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together." - if(hull >= 1) - eventdat += "

Use Part Wait

" + event_info = "Your cargo hold was breached!
" + change_resource(rand(4,5),-1) + if(prob(5*settlers.len)) + remove_settler(null,"was sucked out into the void!") + if(ORION_TRAIL_ILLNESS) + if(prob(15)) + event_info = "" + var/num = 1 + if(prob(15)) + num++ + for(var/i=0;i= 2) - trait2 = remove_crewmember() - - eventdat += "Oh no, some of your crew are attempting to mutiny!!" - if(trait2) - eventdat += "
[trait1] and [trait2]'s have armed themselves with weapons!" - else - eventdat += "
[trait1]'s armed with a weapon!" - - var/chance2attack = alive*20 - if(prob(chance2attack)) - var/chancetokill = 30*traitors_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 traitorss, 2 crew is 50% chance - if(prob(chancetokill)) - var/deadguy = remove_crewmember() - eventdat += "
The traitor[trait2 ? "s":""] run[trait2 ? "":"s"] up to [deadguy] and murder them!" + //check to see if they just jump ship + if(prob(30+(settlers.len-num_traitors)*20)) + event_info = "The traitors decided to jump ship along with some of your supplies!
" + change_resource(4,-1 - (0.2 * num_traitors)) + change_resource(5,-1 - (0.1 * num_traitors)) + for(var/i=0;i" + if(prob(10)) + event_info += "A passing ship has kindly donated fuel to you and wishes you luck on your journey.
" + change_resource(5,0.3) + if(emagged) + emag_effect(specific) + event = specific + +/obj/machinery/computer/arcade/orion_trail/proc/emag_effect(var/event) + switch(event) + if(ORION_TRAIL_RAIDERS) + if(istype(usr,/mob/living/carbon)) + var/mob/living/carbon/M = usr + if(prob(50)) + usr << "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?" + M.hallucination += 50 else - eventdat += "
The traitor[trait2 ? "s":""] run[trait2 ? "":"s"] away, What wimps!" - if(trait2) - traitors_aboard = max(0,traitors_aboard-2) - else - traitors_aboard = max(0,--traitors_aboard) - - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - - if(ORION_TRAIL_SPACEPORT) - gameStatus = ORION_STATUS_MARKET - if(spaceport_raided) - eventdat += "The Spaceport is on high alert! they wont let you dock since you tried to attack them!" - if(last_spaceport_action) - eventdat += "
Last Spaceport Action: [last_spaceport_action]" - eventdat += "

Depart Spaceport

" - eventdat += "

Close

" + usr << "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there..." + M.take_organ_damage(10) else - eventdat += "You pull the ship up to dock at a nearby Spaceport, lucky find!" - eventdat += "
This Spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." - eventdat += "
Trading terms: FU = Fuel, FO = Food" - if(last_spaceport_action) - eventdat += "
Last Spaceport Action: [last_spaceport_action]" - eventdat += "

Crew:

" - eventdat += english_list(settlers) - eventdat += "
Food: [food] | Fuel: [fuel]" - eventdat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" + usr << "The sounds of battle fill your ears..." + if(ORION_TRAIL_ILLNESS) + if(istype(usr,/mob/living/carbon/human)) + var/mob/living/carbon/human/M = usr + M << "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit." + M.vomit() + else + usr << "You feel ill." + if(ORION_TRAIL_CARP) + usr << " Something bit you!" + var/mob/living/M = usr + M.adjustBruteLoss(10) + if(ORION_TRAIL_FLUX) + if(istype(usr,/mob/living/carbon) && prob(75)) + var/mob/living/carbon/M = usr + M.Weaken(3) + src.visible_message("A sudden gust of powerful wind slams \the [M] into the floor!", "You hear a large fwooshing sound, followed by a bang.") + M.take_organ_damage(10) + else + usr << "A violent gale blows past you, and you barely manage to stay standing!" + if(ORION_TRAIL_MALFUNCTION) + if(supplies["3"]) + return + src.visible_message("\The [src]'s screen glitches out and smoke comes out of the back.") + for(var/i=1;i<7;i++) + supplies["[i]"] = max(0,supplies["[i]"] + rand(-10,10)) + if(ORION_TRAIL_COLLISION) + if(prob(90) && !supplies["2"]) + var/turf/simulated/floor/F = src.loc + F.ChangeTurf(/turf/space) + src.visible_message("Something slams into the floor around \the [src], exposing it to space!", "You hear something crack and break.") + else + src.visible_message("Something slams into the floor around \the [src] - luckily, it didn't get through!", "You hear something crack.") + if(ORION_TRAIL_GAMEOVER) + usr << "You're never going to make it to Orion..." + var/mob/living/M = usr + M.visible_message("\The [M] starts rapidly deteriorating.") + M << browse (null,"window=arcade") + for(var/i=0;i<10;i++) + sleep(10) + M.Stun(5) + M.adjustBruteLoss(10) + M.adjustFireLoss(10) + usr.gib() //So that people can't cheese it and inject a lot of kelo/bicard before losing - //If your crew is pathetic you can get freebies (provided you haven't already gotten one from this port) - if(!spaceport_freebie && (fuel < 20 || food < 20)) - spaceport_freebie++ - var/FU = 10 - var/FO = 10 - var/freecrew = 0 - if(prob(30)) - FU = 25 - FO = 25 - - if(prob(10)) - add_crewmember() - freecrew++ - - eventdat += "
The traders of the spaceport take pitty on you, and give you some food and fuel (+[FU]FU,+[FO]FO)" - if(freecrew) - eventdat += "
You also gain a new crewmember!" - - fuel += FU - food += FO - - //CREW INTERACTIONS - eventdat += "

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 += "

Buy Engine Parts (-5FU)

" - else - eventdat += "

Cant afford to buy Engine Parts" - - //Hull plates - if(fuel > 5) - eventdat += "

Buy Hull Plates (-5FU)

" - else - eventdat += "

Cant afford to buy Hull Plates" - - //Electronics - if(fuel > 5) - eventdat += "

Buy Spare Electronics (-5FU)

" - 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 FuelYou 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 - + event = null + src.updateUsrDialog() /obj/item/weapon/orion_ship name = "model settler ship" @@ -1009,7 +754,6 @@ 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))) @@ -1018,14 +762,11 @@ 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!") @@ -1040,7 +781,6 @@ explosion(src.loc, 1,2,4) qdel(src) -#undef ORION_TRAIL_WINTURN #undef ORION_TRAIL_RAIDERS #undef ORION_TRAIL_FLUX #undef ORION_TRAIL_ILLNESS @@ -1050,9 +790,13 @@ #undef ORION_TRAIL_MALFUNCTION #undef ORION_TRAIL_COLLISION #undef ORION_TRAIL_SPACEPORT -#undef ORION_TRAIL_BLACKHOLE +#undef ORION_TRAIL_DISASTER +#undef ORION_TRAIL_CARP +#undef ORION_TRAIL_STUCK +#undef ORION_TRAIL_START +#undef ORION_TRAIL_GAMEOVER -#undef ORION_STATUS_START -#undef ORION_STATUS_NORMAL -#undef ORION_STATUS_GAMEOVER -#undef ORION_STATUS_MARKET \ No newline at end of file + +#undef ORION_VIEW_MAIN +#undef ORION_VIEW_SUPPLIES +#undef ORION_VIEW_CREW \ No newline at end of file diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 579a329b7fc..8d269c664ef 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -1135,13 +1135,13 @@ var/global/list/gear_datums = list() cost = 1 /datum/gear/cardemon_pack - display_name = "Cardemon booster pack" + display_name = "\improper Cardemon booster pack" path = /obj/item/weapon/pack/cardemon sort_category = "misc" cost = 1 /datum/gear/spaceball_pack - display_name = "Spaceball booster pack" + display_name = "\improper Spaceball booster pack" path = /obj/item/weapon/pack/spaceball sort_category = "misc" cost = 1 diff --git a/code/modules/games/cardemon.dm b/code/modules/games/cardemon.dm index 769e090380f..0c35379fec2 100644 --- a/code/modules/games/cardemon.dm +++ b/code/modules/games/cardemon.dm @@ -1,5 +1,5 @@ /obj/item/weapon/pack/cardemon - name = "cardemon booster pack" + name = "\improper Cardemon booster pack" desc = "Finally! A children's card game in space!" icon_state = "card_pack_cardemon" diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 368bfdd9a5f..781d4313584 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -169,7 +169,7 @@ deal_at(usr, over) /obj/item/weapon/pack/ - name = "Card Pack" + name = "card pack" desc = "For those with disposible income." icon_state = "card_pack" diff --git a/code/modules/games/spaceball_cards.dm b/code/modules/games/spaceball_cards.dm index d54638d8d29..f076f8d9d70 100644 --- a/code/modules/games/spaceball_cards.dm +++ b/code/modules/games/spaceball_cards.dm @@ -1,5 +1,5 @@ /obj/item/weapon/pack/spaceball - name = "spaceball booster pack" + name = "\improper Spaceball booster pack" desc = "Officially licensed to take your money." icon_state = "card_pack_spaceball" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index b606d2559ef..2395708dd9d 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -755,7 +755,7 @@ CIRCUITS BELOW id = "oriontrail" req_tech = list(TECH_DATA = 1) build_path = /obj/item/weapon/circuitboard/arcade/orion_trail - sort_string = "MAAAA" + sort_string = "MABAA" /datum/design/circuit/seccamera name = "security camera monitor" diff --git a/html/changelogs/TheWelp-fluff2.yml b/html/changelogs/TheWelp-fluff2.yml new file mode 100644 index 00000000000..b4a96c500e1 --- /dev/null +++ b/html/changelogs/TheWelp-fluff2.yml @@ -0,0 +1,9 @@ +author: TheWelp + +delete-after: True + +changes: + - rscadd: "Added boardgame item for use with table-top board games." + - rscadd: "Added Actors Guild, an alternate spawn that allows players to control actors." + - rscadd: "Added differing card decks, including a Tarot deck and two trading card games." + - rscadd: "Remade /TG/Station's Orion Trail arcade machine with bay-specific modifications."