[MIRROR] Fixes the Orion Trail machine (#2703)

* Fixes the Orion Trail machine

* Update arcade.dm
This commit is contained in:
CitadelStationBot
2017-09-13 18:08:18 -05:00
committed by Poojawa
parent 9bf6932527
commit 34edb1b5e4
+42 -38
View File
@@ -414,8 +414,8 @@
if(gameStatus == ORION_STATUS_GAMEOVER)
dat = "<center><h1>Game Over</h1></center>"
dat += "Like many before you, your crew never made it to Orion, lost to space... <br><b>Forever</b>."
if(settlers.len == 0)
dat += "<br>Your entire crew died, your ship joins the fleet of ghost-ships littering the galaxy."
if(!settlers.len)
dat += "<br>Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy."
else
if(food <= 0)
dat += "<br>You ran out of food and starved."
@@ -429,7 +429,6 @@
M.adjust_fire_stacks(5)
M.IgniteMob() //flew into a star, so you're on fire
to_chat(user, "<span class='userdanger'><font size=3>You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.</span>")
dat += "<br><P ALIGN=Right><a href='byond://?src=\ref[src];menu=1'>OK...</a></P>"
if(emagged)
to_chat(user, "<span class='userdanger'><font size=3>You're never going to make it to Orion...</span></font>")
@@ -439,6 +438,7 @@
name = "The Orion Trail"
desc = "Learn how our ancestors got to Orion, and have fun in the process!"
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];menu=1'>May They Rest In Peace</a></P>"
else if(event)
dat = eventdat
else if(gameStatus == ORION_STATUS_NORMAL)
@@ -454,7 +454,7 @@
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];pastblack=1'>Go Around</a> <a href='byond://?src=\ref[src];blackhole=1'>Continue</a></P>"
else
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];continue=1'>Continue</a></P>"
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];killcrew=1'>Kill a crewmember</a></P>"
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];killcrew=1'>Kill a Crewmember</a></P>"
dat += "<P ALIGN=Right><a href='byond://?src=\ref[src];close=1'>Close</a></P>"
else
dat = "<center><h2>The Orion Trail</h2></center>"
@@ -609,17 +609,15 @@
if(prob(75))
event = ORION_TRAIL_BLACKHOLE
event()
if(emagged) //has to be here because otherwise it doesn't work
if(emagged)
playsound(loc, 'sound/effects/supermatter.ogg', 100, 1)
say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!")
if(isliving(usr))
var/mob/living/L = usr
L.Stun(200, ignore_canstun = TRUE) //you can't run :^)
var/S = new /obj/singularity/academy(usr.loc)
emagged = FALSE //immediately removes emagged status so people can't kill themselves by sprinting up and interacting
sleep(50)
say("[S] winks out, just as suddenly as it appeared.")
qdel(S)
addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50)
QDEL_IN(src, 50)
else
event = null
turns += 1
@@ -691,19 +689,20 @@
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)"
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)"
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)"
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)
say("WEEWOO WEEWOO, Spaceport Security en route!")
say("WEEWOO! WEEWOO! Spaceport security en route!")
playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE)
for(var/i, i<=3, i++)
var/mob/living/simple_animal/hostile/syndicate/ranged/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/orion(get_turf(src))
O.target = usr
@@ -766,9 +765,9 @@
eventdat += "<br>They have stolen [sfood] <b>Food</b> and [sfuel] <b>Fuel</b>."
else if(prob(10))
var/deadname = remove_crewmember()
eventdat += "<br>[deadname] tried to fight back but was killed."
eventdat += "<br>[deadname] tried to fight back, but was killed."
else
eventdat += "<br>Fortunately you fended them off without any trouble."
eventdat += "<br>Fortunately, you fended them off without any trouble."
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];eventclose=1'>Continue</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];close=1'>Close</a></P>"
canContinueEvent = 1
@@ -844,7 +843,7 @@
else if(prob(70))
lings_aboard = min(++lings_aboard,2)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];killcrew=1'>Kill a crewmember</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];killcrew=1'>Kill a Crewmember</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];eventclose=1'>Risk it</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];close=1'>Close</a></P>"
canContinueEvent = 1
@@ -859,7 +858,7 @@
if(lings_aboard >= 2)
ling2 = remove_crewmember()
eventdat += "Oh no, some of your crew are Changelings!"
eventdat += "Changelings among your crew suddenly burst from hiding and attack!"
if(ling2)
eventdat += "<br>[ling1] and [ling2]'s arms twist and contort into grotesque blades!"
else
@@ -870,18 +869,23 @@
var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance
if(prob(chancetokill))
var/deadguy = remove_crewmember()
eventdat += "<br>The Changeling[ling2 ? "s":""] run[ling2 ? "":"s"] up to [deadguy] and capitulates them!"
var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \
"[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \
"[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!")
eventdat += "<br>[murder_text]"
else
eventdat += "<br>You valiantly fight off the Changeling[ling2 ? "s":""]!"
eventdat += "<br>You cut the Changeling[ling2 ? "s":""] up into meat... Eww"
eventdat += "<br><br><b>You valiantly fight off the changeling[ling2 ? "s":""]!</b>"
if(ling2)
food += 30
lings_aboard = max(0,lings_aboard-2)
else
food += 15
lings_aboard = max(0,--lings_aboard)
eventdat += "<br><i>Well, it's perfectly good food...</i>\
<br>You cut the changeling[ling2 ? "s" : ""] into meat, gaining <b>[ling2 ? "30" : "15"]</b> Food!"
else
eventdat += "<br>The Changeling[ling2 ? "s":""] run[ling2 ? "":"s"] away, What wimps!"
eventdat += "<br><br>[pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \
the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now."
if(ling2)
lings_aboard = max(0,lings_aboard-2)
else
@@ -895,17 +899,17 @@
if(ORION_TRAIL_SPACEPORT)
gameStatus = ORION_STATUS_MARKET
if(spaceport_raided)
eventdat += "The Spaceport is on high alert! They won't let you dock since you tried to attack them!"
eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid."
if(last_spaceport_action)
eventdat += "<br>Last Spaceport Action: [last_spaceport_action]"
eventdat += "<br><b>Last Spaceport Action:</b> [last_spaceport_action]"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];leave_spaceport=1'>Depart Spaceport</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];close=1'>Close</a></P>"
else
eventdat += "You pull the ship up to dock at a nearby Spaceport, lucky find!"
eventdat += "<br>This Spaceport is home to travellers who failed to reach Orion, but managed to find a different home..."
eventdat += "Your jump into the sector yields a spaceport - a lucky find!"
eventdat += "<br>This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..."
eventdat += "<br>Trading terms: FU = Fuel, FO = Food"
if(last_spaceport_action)
eventdat += "<br>Last Spaceport Action: [last_spaceport_action]"
eventdat += "<br><b>Last action:</b> [last_spaceport_action]"
eventdat += "<h3><b>Crew:</b></h3>"
eventdat += english_list(settlers)
eventdat += "<br><b>Food: </b>[food] | <b>Fuel: </b>[fuel]"
@@ -926,7 +930,7 @@
add_crewmember()
freecrew++
eventdat += "<br>The traders of the spaceport take pitty on you, and give you some food and fuel (+[FU]FU,+[FO]FO)"
eventdat += "<br>The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)"
if(freecrew)
eventdat += "<br>You also gain a new crewmember!"
@@ -938,15 +942,15 @@
//Buy crew
if(food >= 10 && fuel >= 10)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];buycrew=1'>Hire a new Crewmember (-10FU,-10FO)</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];buycrew=1'>Hire a New Crewmember (-10FU, -10FO)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford a new Crewmember</P>"
eventdat += "<P ALIGN=Right>You cannot afford a new crewmember.</P>"
//Sell crew
if(settlers.len > 1)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];sellcrew=1'>Sell crew for Fuel and Food (+7FU,+7FO)</a></P>"
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];sellcrew=1'>Sell Crew for Fuel and Food (+7FU, +7FO)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to sell a Crewmember</P>"
eventdat += "<P ALIGN=Right>You have no other crew to sell.</P>"
//BUY/SELL STUFF
eventdat += "<P ALIGN=Right>Spare Parts:</P>"
@@ -955,30 +959,30 @@
if(fuel > 5)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];buyparts=1'>Buy Engine Parts (-5FU)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to buy Engine Parts</a>"
eventdat += "<P ALIGN=Right>You cannot afford engine parts.</a>"
//Hull plates
if(fuel > 5)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];buyparts=2'>Buy Hull Plates (-5FU)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to buy Hull Plates</a>"
eventdat += "<P ALIGN=Right>You cannot afford hull plates.</a>"
//Electronics
if(fuel > 5)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];buyparts=3'>Buy Spare Electronics (-5FU)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to buy Spare Electronics</a>"
eventdat += "<P ALIGN=Right>You cannot afford spare electronics.</a>"
//Trade
if(fuel > 5)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];trade=1'>Trade Fuel for Food (-5FU,+5FO)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to Trade Fuel for Food</P"
eventdat += "<P ALIGN=Right>You don't have 5FU to trade.</P"
if(food > 5)
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];trade=2'>Trade Food for Fuel (+5FU,-5FO)</a></P>"
else
eventdat += "<P ALIGN=Right>Cant afford to Trade Food for Fuel</P"
eventdat += "<P ALIGN=Right>You don't have 5FO to trade.</P"
//Raid the spaceport
eventdat += "<P ALIGN=Right><a href='byond://?src=\ref[src];raid_spaceport=1'>!! Raid Spaceport !!</a></P>"
@@ -1044,8 +1048,8 @@
emagged = TRUE
/mob/living/simple_animal/hostile/syndicate/ranged/orion
name = "Spaceport Security"
desc = "The Premier security forces for all spaceports found along the Orion Trail."
name = "spaceport security"
desc = "Premier corporate security forces for all spaceports found along the Orion Trail."
faction = list("orion")
loot = list()
del_on_death = TRUE