public override void HandleEvent(OptionTag oType) { base.HandleEvent(oType); switch (oType) { case (OptionTag.Land): if (characters[0].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry(characters[0].Name + " has successfully landed on " + subject + " allowing the party to scavange for resources."); EventActions.gainRandomResource(this); EventActions.gainRandomResource(this); GameControllerScript.instance.locationState = LocationState.Land; } else { LogEntry("As " + characters[0].Name + " descends into the atmosphere, an electrical storm knocks out the " + GameControllerScript.instance.party.ship.Name + "'s engines, causing it to crash."); GameControllerScript.instance.party.ship.Damage(5); EventActions.loseResource(this, "Fuel"); GameControllerScript.instance.locationState = LocationState.Land; } break; case (OptionTag.Scan): if (Random.Range(0, 100) > 60) { LogEntry(characters[1].Name + " scans " + subject + " and determines it is rich with minerals."); EventActions.gainRandomResource(this); } else { LogEntry("The atmosphere of " + subject + " is creating too much interference to properly scan."); } EventActions.loseResource(this, "Fuel"); break; case (OptionTag.Bypass): LogEntry(characters[2].Name + " guides the ship around the planet."); EventActions.loseResource(this, "Fuel"); GameControllerScript.instance.LightYearsToEOU -= 2; break; } GameControllerScript.instance.currentSituation = null; }
public override void HandleEvent(OptionTag oType) { base.HandleEvent(oType); switch (oType) { case (OptionTag.Flee): if (characters[0].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry("It's about to get spicy as " + characters[0].Name + " churns up the engines to the MAX. " + ship.Name + "'s thrusters f****n' RIP OUT OF THERE."); GameControllerScript.instance.LightYearsToEOU -= 3; EventActions.loseResource(this, "Fuel"); enemyShip = null; } else { LogEntry("Maybe " + ship.Name + " isn't as nimble as we thought, maybe " + characters[0].Name + " is just a shit pilot, only time will tell..."); GameControllerScript.instance.party.ship.Damage(5); GameControllerScript.instance.LightYearsToEOU -= 1; EventActions.loseResource(this, "Fuel"); } break; case (OptionTag.Blast): if (characters[1].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry(ship.Name + " fires at full power, blasting " + subject + " to bits."); enemyShip = null; EventActions.gainRandomResource(this); GameControllerScript.instance.LightYearsToEOU -= 1; } else { LogEntry(characters[1].Name + " misjudges the shot an leaves " + ship.Name + " vulnerable to counter fire."); GameControllerScript.instance.party.ship.Damage(Random.Range(1, 10)); } break; case (OptionTag.Board): if (characters[2].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry(characters[2].Name + " boarded the enemy ship with ease! After a fierce battle on board you manage to steal some goods and make your way out."); enemyShip = null; EventActions.gainRandomResource(this); EventActions.gainRandomResource(this); } else { LogEntry("The boarding was botched! You'll have to come around to try again."); EventActions.loseResource(this, "Fuel"); GameControllerScript.instance.LightYearsToEOU -= 1; } break; case (OptionTag.Negotiate): if (characters[3].getStat("Mind") + Random.Range(0, 3) > 6) { LogEntry(characters[3].Name + " convices the enemies to stand down."); GameControllerScript.instance.LightYearsToEOU -= 1; } else { LogEntry("The enemies decide not to attack however you must send them some resources as tribute."); EventActions.loseRandomResource(this); GameControllerScript.instance.LightYearsToEOU -= 1; } enemyShip = null; break; } if (enemyShip != null) { Continue(); } else { GameControllerScript.instance.currentSituation = null; } }
public override void HandleEvent(OptionTag oType) { base.HandleEvent(oType); switch (oType) { case (OptionTag.Avoid): if (characters[0].getStat("Piloting") + Random.Range(0, 3) > 6) { if (randomSkillGain(characters[0], "Piloting")) { LogEntry("You seem to be at one with the controls of the ship, you feel your skills as a pilot grow!\n\n" + characters[0].Name + "'s Piloting increases! " + characters[0].getStat("Piloting")); } else { LogEntry("You race to the helm, and dive into the pilots seat in an effort to steer the ship clear of the asteroid. A narrow success."); GameControllerScript.instance.party.ship.Damage(5); //LogEntry(ship.Name + " has lost " + 5 + " shields."); //GameControllerScript.instance.party.changeShipStat("Shields", -5); } } else { if (randomSkillLoss(characters[0], "Piloting")) { characters[0].changeStat("Piloting", -1); LogEntry("You scrape against the asteriods hard exterior, a compartment of the ship holding ESSENTIAL supplies has been damaged and it's contents blown into space! Maybe you weren't meant to hang around the pilots seat...\n\n" + characters[0].Name + "'s Piloting decreases! " + characters[0].getStat("Piloting")); } else { LogEntry("Your heroic dive to the pilots seat is misaligned, luckily it wasn't the hardest asteroid in the galaxy, and your ship destroys it with it's hull."); } } GameControllerScript.instance.LightYearsToEOU -= 2; EventActions.loseResource(this, "Fuel"); break; case (OptionTag.Blast): if (characters[1].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry("Ya f****n blasted it bud."); } else { LogEntry("Ya f****d up blasting it."); } GameControllerScript.instance.LightYearsToEOU -= 1; EventActions.loseResource(this, "Fuel"); break; case (OptionTag.Land): if (characters[2].getStat("Piloting") + Random.Range(0, 3) > 6) { LogEntry(characters[2].Name + " has successfully landed on the Asteroid, allowing the party to scavange for resources."); EventActions.gainRandomResource(this); EventActions.gainRandomResource(this); GameControllerScript.instance.locationState = LocationState.Land; } else { LogEntry(characters[2].Name + " misjudges the landing and the ship scapes along the surface of the asteroid. The party decides to cut their losses and not try again."); GameControllerScript.instance.party.ship.Damage(5); GameControllerScript.instance.LightYearsToEOU -= 1; EventActions.loseResource(this, "Fuel"); } break; } GameControllerScript.instance.currentSituation = null; }