|
|
|
@@ -229,7 +229,7 @@
|
|
|
|
|
return
|
|
|
|
|
busy = TRUE
|
|
|
|
|
|
|
|
|
|
var/gamerSkillLevel = 0
|
|
|
|
|
// var/gamerSkillLevel = 0
|
|
|
|
|
var/gamerSkill = 0
|
|
|
|
|
var/gamerSkillRands = 0
|
|
|
|
|
|
|
|
|
@@ -402,7 +402,7 @@
|
|
|
|
|
else if(href_list["killcrew"]) //shoot a crewmember
|
|
|
|
|
if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_LING)
|
|
|
|
|
var/sheriff = remove_crewmember() //I shot the sheriff
|
|
|
|
|
playsound(loc,'sound/weapons/gun/pistol/shot.ogg', 100, TRUE)
|
|
|
|
|
playsound(loc,'sound/weapons/gunshot.ogg', 100, TRUE)
|
|
|
|
|
killed_crew++
|
|
|
|
|
|
|
|
|
|
var/mob/living/user = usr
|
|
|
|
@@ -529,246 +529,6 @@
|
|
|
|
|
busy = FALSE
|
|
|
|
|
// usr?.mind?.adjust_experience(/datum/skill/gaming, xp_gained+1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/machinery/computer/arcade/orion_trail/proc/event()
|
|
|
|
|
eventdat = "<center><h1>[event]</h1></center>"
|
|
|
|
|
canContinueEvent = 0
|
|
|
|
|
switch(event)
|
|
|
|
|
if(ORION_TRAIL_RAIDERS)
|
|
|
|
|
eventdat += "Raiders have come aboard your ship!"
|
|
|
|
|
if(prob(50))
|
|
|
|
|
var/sfood = rand(1,10)
|
|
|
|
|
var/sfuel = rand(1,10)
|
|
|
|
|
food -= sfood
|
|
|
|
|
fuel -= sfuel
|
|
|
|
|
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."
|
|
|
|
|
else
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_FLUX)
|
|
|
|
|
eventdat += "This region of space is highly turbulent. <br>If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies."
|
|
|
|
|
eventdat += "<br>What will you do?"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];slow=1'>Slow Down</a> <a href='byond://?src=[REF(src)];keepspeed=1'>Continue</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_ILLNESS)
|
|
|
|
|
eventdat += "A deadly illness has been contracted!"
|
|
|
|
|
var/deadname = remove_crewmember()
|
|
|
|
|
eventdat += "<br>[deadname] was killed by the disease."
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_BREAKDOWN)
|
|
|
|
|
eventdat += "Oh no! The engine has broken down!"
|
|
|
|
|
eventdat += "<br>You can repair it with an engine part, or you can make repairs for 3 days."
|
|
|
|
|
if(engine >= 1)
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];useengine=1'>Use Part</a><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
else
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_MALFUNCTION)
|
|
|
|
|
eventdat += "The ship's systems are malfunctioning!"
|
|
|
|
|
eventdat += "<br>You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI."
|
|
|
|
|
if(electronics >= 1)
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];useelec=1'>Use Part</a><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
else
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
|
|
|
|
|
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 += "<br>[sfood] <b>Food</b> and [sfuel] <b>Fuel</b> was vented out into space."
|
|
|
|
|
if(prob(10))
|
|
|
|
|
var/deadname = remove_crewmember()
|
|
|
|
|
eventdat += "<br>[deadname] was killed by rapid depressurization."
|
|
|
|
|
eventdat += "<br>You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together."
|
|
|
|
|
if(hull >= 1)
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];usehull=1'>Use Part</a><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
else
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];wait=1'>Wait</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_BLACKHOLE)
|
|
|
|
|
eventdat += "You were swept away into the black hole."
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];holedeath=1'>Oh...</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
settlers = list()
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_LING)
|
|
|
|
|
eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..."
|
|
|
|
|
if(settlers.len <= 2)
|
|
|
|
|
eventdat += "<br>Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..."
|
|
|
|
|
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>"
|
|
|
|
|
if(prob(10)) // "likely", I didn't say it was guaranteed!
|
|
|
|
|
lings_aboard = min(++lings_aboard,2)
|
|
|
|
|
else
|
|
|
|
|
if(lings_aboard) //less likely to stack lings
|
|
|
|
|
if(prob(20))
|
|
|
|
|
lings_aboard = min(++lings_aboard,2)
|
|
|
|
|
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)];eventclose=1'>Risk it</a></P>"
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];close=1'>Close</a></P>"
|
|
|
|
|
canContinueEvent = 1
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_LING_ATTACK)
|
|
|
|
|
if(lings_aboard <= 0) //shouldn't trigger, but hey.
|
|
|
|
|
eventdat += "Haha, fooled you, there are no changelings on board!"
|
|
|
|
|
eventdat += "<br>(You should report this to a coder :S)"
|
|
|
|
|
else
|
|
|
|
|
var/ling1 = remove_crewmember()
|
|
|
|
|
var/ling2 = ""
|
|
|
|
|
if(lings_aboard >= 2)
|
|
|
|
|
ling2 = remove_crewmember()
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
eventdat += "<br>[ling1]'s arm twists and contorts into a grotesque blade!"
|
|
|
|
|
|
|
|
|
|
var/chance2attack = alive*20
|
|
|
|
|
if(prob(chance2attack))
|
|
|
|
|
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()
|
|
|
|
|
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><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><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
|
|
|
|
|
lings_aboard = max(0,--lings_aboard)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ORION_TRAIL_SPACEPORT)
|
|
|
|
|
gameStatus = ORION_STATUS_MARKET
|
|
|
|
|
if(spaceport_raided)
|
|
|
|
|
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><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 += "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><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]"
|
|
|
|
|
eventdat += "<br><b>Engine Parts: </b>[engine] | <b>Hull Panels: </b>[hull] | <b>Electronics: </b>[electronics]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//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 += "<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!"
|
|
|
|
|
|
|
|
|
|
fuel += FU
|
|
|
|
|
food += FO
|
|
|
|
|
|
|
|
|
|
//CREW INTERACTIONS
|
|
|
|
|
eventdat += "<P ALIGN=Right>Crew Management:</P>"
|
|
|
|
|
|
|
|
|
|
//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>"
|
|
|
|
|
else
|
|
|
|
|
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>"
|
|
|
|
|
else
|
|
|
|
|
eventdat += "<P ALIGN=Right>You have no other crew to sell.</P>"
|
|
|
|
|
|
|
|
|
|
//BUY/SELL STUFF
|
|
|
|
|
eventdat += "<P ALIGN=Right>Spare Parts:</P>"
|
|
|
|
|
|
|
|
|
|
//Engine parts
|
|
|
|
|
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>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>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>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>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>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>"
|
|
|
|
|
|
|
|
|
|
eventdat += "<P ALIGN=Right><a href='byond://?src=[REF(src)];leave_spaceport=1'>Depart Spaceport</a></P>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/machinery/computer/arcade/orion_trail/proc/event()
|
|
|
|
|
eventdat = "<center><h1>[event]</h1></center>"
|
|
|
|
|
canContinueEvent = 0
|
|
|
|
|