001package com.fs.starfarer.api.impl.campaign.missions.academy; 002 003import java.awt.Color; 004import java.util.List; 005import java.util.Map; 006 007import com.fs.starfarer.api.Global; 008import com.fs.starfarer.api.campaign.FactionAPI; 009import com.fs.starfarer.api.campaign.InteractionDialogAPI; 010import com.fs.starfarer.api.campaign.PersonImportance; 011import com.fs.starfarer.api.campaign.SectorEntityToken; 012import com.fs.starfarer.api.campaign.StarSystemAPI; 013import com.fs.starfarer.api.campaign.econ.MarketAPI; 014import com.fs.starfarer.api.campaign.rules.MemoryAPI; 015import com.fs.starfarer.api.characters.PersonAPI; 016import com.fs.starfarer.api.impl.campaign.ids.Entities; 017import com.fs.starfarer.api.impl.campaign.ids.Factions; 018import com.fs.starfarer.api.impl.campaign.ids.FleetTypes; 019import com.fs.starfarer.api.impl.campaign.ids.People; 020import com.fs.starfarer.api.impl.campaign.ids.Ranks; 021import com.fs.starfarer.api.impl.campaign.ids.Tags; 022import com.fs.starfarer.api.impl.campaign.missions.hub.ReqMode; 023import com.fs.starfarer.api.ui.TooltipMakerAPI; 024import com.fs.starfarer.api.util.Misc; 025import com.fs.starfarer.api.util.Misc.Token; 026import com.fs.starfarer.api.util.WeightedRandomPicker; 027 028public class GAFindingCoureuse extends GABaseMission { 029 030 public static enum Stage { 031 CHOOSE_PATH, 032 INVESTIGATE_FIKENHILD, 033 FOLLOW_THE_EXPERIMENTS, 034 SEARCH_ISIRAH, 035 CONFRONT_ARCHON, 036 VISIT_COUREUSE, 037 RETURN_TO_ACADEMY, 038 COMPLETED, 039 } 040 041 protected PersonAPI baird; 042 protected PersonAPI arroyo; 043 protected PersonAPI coureuse; 044 protected PersonAPI siyavong; 045 protected PersonAPI zal; 046 protected PersonAPI laicailleArchon; 047 protected PersonAPI kapteynAgent; 048 protected SectorEntityToken groombridge; 049 protected StarSystemAPI probeSystem; 050 protected int bribeCost; 051 protected int sellOutPrice; 052 protected int kapteynBribeCost; 053 protected int kapteynBarBribeCost; 054 protected SectorEntityToken scavengerFleet; 055 protected SectorEntityToken probeEmpty; 056 057 @Override 058 protected boolean create(MarketAPI createdAt, boolean barEvent) { 059 // if already accepted by the player, abort 060 if (!setGlobalReference("$gaFC_ref", "$gaFC_inProgress")) { 061 return false; 062 } 063 064 setName("Finding Coureuse"); 065 066 MarketAPI laicaille = Global.getSector().getEconomy().getMarket("laicaille_habitat"); 067 MarketAPI kapteyn = Global.getSector().getEconomy().getMarket("station_kapteyn"); 068 MarketAPI fikenhild = Global.getSector().getEconomy().getMarket("fikenhild"); 069 if (laicaille == null || kapteyn == null || fikenhild == null) return false; 070 071 baird = getImportantPerson(People.BAIRD); 072 arroyo = getImportantPerson(People.ARROYO); 073 coureuse = getImportantPerson(People.COUREUSE); 074 siyavong = getImportantPerson(People.SIYAVONG); 075 zal = getImportantPerson(People.ZAL); 076 laicailleArchon = Global.getSector().getImportantPeople().getPerson(People.LAICAILLE_ARCHON); 077 078 // Kind of a lot of effort for a minor character, but ... -dgb 079 kapteynAgent = Global.getSector().getFaction(Factions.PIRATES).createRandomPerson(genRandom); 080 kapteynAgent.setRankId(Ranks.CITIZEN); 081 kapteynAgent.setPostId(Ranks.POST_SHADY); 082 kapteynAgent.setImportance(PersonImportance.MEDIUM); 083 kapteynAgent.addTag(Tags.CONTACT_UNDERWORLD); 084 kapteyn.getCommDirectory().addPerson(kapteynAgent); 085 kapteyn.addPerson(kapteynAgent); 086 087 if (baird == null || arroyo == null || coureuse == null || 088 siyavong == null || laicailleArchon == null || kapteynAgent == null) return false; 089 090 groombridge = Global.getSector().getEntityById("groombridge_habitat"); 091 if (groombridge == null) return false; 092 093 094 095 // Find a system to hide some probes in. 096 resetSearch(); 097 requireSystemTags(ReqMode.ANY, Tags.THEME_MISC, Tags.THEME_MISC_SKIP, Tags.THEME_RUINS); 098 requireSystemTags(ReqMode.NOT_ANY, Tags.THEME_UNSAFE, Tags.THEME_CORE, Tags.SYSTEM_ALREADY_USED_FOR_STORY); 099 requireSystemNotAlreadyUsedForStory(); 100 requireSystemNotHasPulsar(); // gets really awkward for the scavenger fleet if it does have one 101 preferSystemOnFringeOfSector(); 102 preferSystemUnexplored(); 103 preferSystemInDirectionOfOtherMissions(); 104 probeSystem = pickSystem(); 105 if (probeSystem == null) return false; 106 107 108 // this *should* work -Alex 109 // Set up 3? probes in the system to discover. 110 // I sure hope they don't end up in the same place. -dgb 111 SectorEntityToken probe1 = spawnEntity(Entities.GENERIC_PROBE, new LocData(EntityLocationType.HIDDEN, null, probeSystem)); 112 SectorEntityToken probe2 = spawnEntity(Entities.GENERIC_PROBE, new LocData(EntityLocationType.HIDDEN_NOT_NEAR_STAR, null, probeSystem)); 113 SectorEntityToken probe3 = spawnEntity(Entities.GENERIC_PROBE, new LocData(EntityLocationType.UNCOMMON, null, probeSystem)); 114 //SectorEntityToken probe4 = spawnEntity(Entities.GENERIC_PROBE, new LocData(EntityLocationType.HIDDEN, null, probeSystem)); 115 if (probe1 == null || probe2 == null || probe3 == null) return false; 116 117 probe1.setCustomDescriptionId("ga_hyperprobe"); 118 probe2.setCustomDescriptionId("ga_hyperprobe"); 119 probe3.setCustomDescriptionId("ga_hyperprobe"); 120 121 // set a random probe as looted. 122 WeightedRandomPicker<SectorEntityToken> picker = new WeightedRandomPicker<SectorEntityToken>(genRandom); 123 picker.add(probe1, 1f); 124 picker.add(probe2, 1f); 125 picker.add(probe3, 1f); 126 127 // set the empty probe aside - set it as unimportant after the scavenger probe is found 128 probeEmpty = picker.pick(); 129 probeEmpty.addTag("empty"); 130 131 // "probe4" is the interior components of the looted probe, held by the scavenger. 132 133 // Add the scavenger 134 addProbeScavengerFleet(); 135 // And the ambush fleet. 136 addPatherAmbushFleet(); 137 // And the triTach merc! Because I forgot to do this for forever. 138 spawnTriTachMercFleet(); 139 140 bribeCost = genRoundNumber(15000, 25000); // bribe scavenger 141 sellOutPrice = genRoundNumber(40000, 50000); // payment for selling out Coureuse's loc to TriTach 142 kapteynBribeCost = genRoundNumber(30000, 40000); // bribe Kapteyn admin 143 kapteynBarBribeCost = genRoundNumber(5000, 8000); // bribe someone at Kapteyn bar 144 145 setStoryMission(); 146 147 setStartingStage(Stage.CHOOSE_PATH); 148 addSuccessStages(Stage.COMPLETED); 149 150 // doesn't seem necessary since you'll move out of that stage while still talking to Baird 151 // but also wouldn't really hurt anything since it'd get unset when you move to the next stage -Alex 152 //makeImportant(baird, "gaFC_contact", Stage.CHOOSE_PATH); 153 154 makeImportant(fikenhild, "$gaFC_coureuseInvestigation", Stage.INVESTIGATE_FIKENHILD); 155 makeImportant(probe1, "$gaFC_probe", Stage.FOLLOW_THE_EXPERIMENTS); 156 makeImportant(probe2, "$gaFC_probe", Stage.FOLLOW_THE_EXPERIMENTS); 157 makeImportant(probe3, "$gaFC_probe", Stage.FOLLOW_THE_EXPERIMENTS); 158 probe1.getMemoryWithoutUpdate().set("$gaProbeGeneric", true); 159 probe2.getMemoryWithoutUpdate().set("$gaProbeGeneric", true); 160 probe3.getMemoryWithoutUpdate().set("$gaProbeGeneric", true); 161 //makeImportant(probe4, "$gaFC_probe", Stage.FOLLOW_THE_EXPERIMENTS); 162 163 164 // I'm not sure I want to indicate where the 'clues' in Isirah are. -dgb 165 // Update; but I DO want to flag the Isirah system. Maybe I'll just give Laicaille. -dgb 166 makeImportant(laicailleArchon, "$gaFC_clue", Stage.SEARCH_ISIRAH); 167 //makeImportant(kapteyn.getAdmin(), "$gaFC_clue", Stage.SEARCH_ISIRAH); 168 //makeImportant(groombridge, "$gaFC_clue", Stage.SEARCH_ISIRAH); 169 170 makeImportant(laicailleArchon, "$gaFC_confront", Stage.CONFRONT_ARCHON); 171 makeImportant(laicaille, "$gaFC_safehouse", Stage.VISIT_COUREUSE); 172 makeImportant(baird.getMarket(), "$gaFC_returnHere", Stage.RETURN_TO_ACADEMY); 173 174 //setStageOnGlobalFlag(Stage.CHOOSE_PATH, "$gaFC_choosePath"); 175 setStageOnGlobalFlag(Stage.INVESTIGATE_FIKENHILD, "$gaFC_pickedBranchFikenhild"); 176 setStageOnGlobalFlag(Stage.FOLLOW_THE_EXPERIMENTS, "$gaFC_pickedBranchProbes"); 177 setStageOnGlobalFlag(Stage.SEARCH_ISIRAH, "$gaFC_searchIsirah"); 178 setStageOnGlobalFlag(Stage.CONFRONT_ARCHON, "$gaFC_confrontArchon"); 179 setStageOnGlobalFlag(Stage.VISIT_COUREUSE, "$gaFC_visitCoureuse"); 180 setStageOnGlobalFlag(Stage.RETURN_TO_ACADEMY, "$gaFC_returnToAcademy"); 181 setStageOnGlobalFlag(Stage.COMPLETED, "$gaFC_completed"); 182 183 // after she's moved to GA 184 beginStageTrigger(Stage.RETURN_TO_ACADEMY); 185 triggerUnhideCommListing(coureuse); 186 endTrigger(); 187 188 beginStageTrigger(Stage.RETURN_TO_ACADEMY); 189 triggerHideCommListing(coureuse); 190 endTrigger(); 191 192 float baseDelay = genDelay(14f); // 3f; // 90f; // randomize this a bit via genDelay() 193 beginStageTrigger(Stage.COMPLETED); 194 triggerRunScriptAfterDelay(genDelay(baseDelay), new GAFCReplaceArchon()); 195 //triggerSetGlobalMemoryValueAfterDelay(genDelay(2f), "$gaFC_missionCompleted", true); 196 triggerSetGlobalMemoryValue("$gaFC_missionCompleted", true); 197 triggerMakeNonStoryCritical(coureuse.getMarket(), arroyo.getMarket(), 198 siyavong.getMarket(), zal.getMarket(), 199 laicailleArchon.getMarket(), kapteynAgent.getMarket()); 200 endTrigger(); 201 202 setSystemWasUsedForStory(Stage.CHOOSE_PATH, probeSystem); 203 204 return true; 205 } 206 207 @Override 208 protected boolean callAction(String action, String ruleId, InteractionDialogAPI dialog, List<Token> params, 209 Map<String, MemoryAPI> memoryMap) { 210 211 if ("postFikenhildCleanup".equals(action)) { 212 // $global. is not needed here (and in fact will not work) since 213 // Global.getSector().getMemoryWithoutUpdate() returns the global memory already -Alex 214 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_triedToSeeCavin"); 215 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_beingConspicuous"); 216 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_triedToSeeCavin"); 217 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_knowSiyavongContact"); 218 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_knockedAnyway"); 219 Global.getSector().getMemoryWithoutUpdate().unset("$gaFC_madeSiyavongAngry"); 220 221 //$global.gaFC_knowElissasName // maybe keep this one around for meeting Zal in the Gates arc 222 //$global.gaFC_gotZalContactFromCavin // maybe use when meeting Coureuse 223 224 MarketAPI fikenhild = Global.getSector().getEconomy().getMarket("fikenhild"); 225 if (fikenhild != null) { 226 fikenhild.getMemoryWithoutUpdate().unset("$visitedA"); 227 fikenhild.getMemoryWithoutUpdate().unset("$visitedB"); 228 fikenhild.getMemoryWithoutUpdate().unset("$visitedC"); 229 } 230 231 return true; 232 } 233 if ("dropStolenProbe".equals(action)) { 234 //SectorEntityToken probe = system.addCustomEntity(null, 235 //"Probe name or null if it's in custom_entities", 236 //"<entity type id from custom entities>, Factions.NEUTRAL); 237 //probe.setLocation(scavenger.getLocation().x, scavenger.getLocation().y); // with some extra offset if needed etc 238 239 SectorEntityToken scavenger = getEntityFromGlobal("$gaFC_probeScavenger"); 240 //LocationAPI dropLocation = scavenger.getContainingLocation(); 241 SectorEntityToken probe4 = probeSystem.addCustomEntity(null, "Ejected Cargo Pod", Entities.CARGO_POD_SPECIAL, Factions.NEUTRAL); 242 probe4.setLocation(scavenger.getLocation().x, scavenger.getLocation().y); // redundant? 243 probe4.addTag("gaFC_lootedProbe"); //unused? 244 probe4.getMemoryWithoutUpdate().set("$gaProbeGeneric", true); 245 Misc.makeImportant(probe4, getMissionId()); 246 247 // get rid of the highlight on the empty probe 248 // Yes, the player doesn't *know* it's empty, but this saves time and bother. 249 //Misc.makeUnimportant(probeEmpty, getMissionId()); 250 251 // it was getting re-flagged "important" when updateData etc was called since 252 // it was still noted down that it should be important during the current stage 253 // this method call cleans that out 254 makeUnimportant(scavenger); 255 makeUnimportant(probeEmpty); 256 257 return true; 258 } 259 if ("foundEmptyProbe".equals(action)) { 260 // found empty probe, so now player suspects the scavenger of taking it -dgb 261 SectorEntityToken scavenger = getEntityFromGlobal("$gaFC_probeScavenger"); 262 Misc.makeImportant(scavenger, getMissionId()); 263 264 return true; 265 } 266 if (dialog != null && action.equals("showKapteynBarAgent")) { 267 showPersonInfo(kapteynAgent, dialog, false, false); 268 return true; 269 } 270 if ("soldOutIsirahLead".equals(action)) { 271 // 3 should be good -dgb 272 spawnTriTachInvestigators(); 273 spawnTriTachInvestigators(); 274 spawnTriTachInvestigators(); 275 return true; 276 } 277 278 return false; 279 } 280 281 protected void updateInteractionDataImpl() { 282 set("$gaFC_stage", getCurrentStage()); 283 set("$gaFC_starName", probeSystem.getNameWithNoType()); 284 set("$gaFC_siyavong", siyavong); 285 set("$gaFC_bribeCost", Misc.getWithDGS(bribeCost)); 286 set("$gaFC_kapteynBribeCost", Misc.getWithDGS(kapteynBribeCost)); 287 set("$gaFC_kapteynBarBribeCost", Misc.getWithDGS(kapteynBarBribeCost)); 288 set("$gaFC_sellOutPrice", Misc.getWithDGS(sellOutPrice)); 289 //set("$gaFC_laicailleArchon", laicailleArchon); 290 291 set("$gaFC_KBAheOrShe", kapteynAgent.getHeOrShe()); 292 set("$gaFC_KBAHeOrShe", kapteynAgent.getHeOrShe().substring(0, 1).toUpperCase() + kapteynAgent.getHeOrShe().substring(1)); 293 set("$gaFC_KBAhisOrHer", kapteynAgent.getHisOrHer()); 294 set("$gaFC_KBAHisOrHet", kapteynAgent.getHisOrHer().substring(0, 1).toUpperCase() + kapteynAgent.getHisOrHer().substring(1)); 295 set("$gaFC_KBAhimOrHer", kapteynAgent.getHimOrHer()); 296 set("$gaFC_KBAHimOrHet", kapteynAgent.getHimOrHer().substring(0, 1).toUpperCase() + kapteynAgent.getHimOrHer().substring(1)); 297 298 } 299 300 @Override 301 public void addDescriptionForNonEndStage(TooltipMakerAPI info, float width, float height) { 302 float opad = 10f; 303 //Color h = Misc.getHighlightColor(); 304 FactionAPI heg = Global.getSector().getFaction(Factions.HEGEMONY); 305 306 if (currentStage == Stage.RETURN_TO_ACADEMY) { 307 info.addPara("You've found Academician Scylla Coureuse and brought her out of hiding to return her to" 308 + " work on Baird's secret project at the Galatia Academy.",opad); 309 } else { 310 info.addPara("Find Scylla Coureuse, a former academician of the Galatia Academy who went into hiding " 311 + "after the Hegemony crackdown on hyperspace experimentation.", opad, heg.getBaseUIColor(), "Hegemony"); 312 } 313 314 if (currentStage == Stage.INVESTIGATE_FIKENHILD) { 315 info.addPara("Talk to contacts on Fikenhild associated with Scylla Coureuse to find a lead to her current location -" 316 + " or attract the attention of someone who knows where she is.", opad); 317 //info.addPara(getGoTalkToPersonText(arroyo) + ". He has a relationship with Provost Baird that " 318 // + "can be leveraged to compel his cooperation.", opad); 319 } else if (currentStage == Stage.FOLLOW_THE_EXPERIMENTS) { 320 info.addPara(getGoToSystemTextShort(probeSystem) + " and search for the experimental packages possibly being used by Coureuse.",opad); 321 //info.addPara("Visit " + probe_system.getNameString() + " in person, at his planetside chalet.", opad); 322 } else if (currentStage == Stage.SEARCH_ISIRAH) { 323 info.addPara("Search the Isirah system for Scylla Coureuse. Talk to people who might be involved in hiding " 324 + "her and search for signs of her research.", opad); 325 } else if (currentStage == Stage.CONFRONT_ARCHON) { 326 info.addPara("Confront the archon of Laicaille Habitat about hiding Scylla Coureuse on the station.", opad); 327 } else if (currentStage == Stage.VISIT_COUREUSE) { 328 info.addPara("Visit the safehouse of Scylla Coureuse and convince her to come back to the Galatia Academy.", opad); 329 } else if (currentStage == Stage.RETURN_TO_ACADEMY) { 330 info.addPara("Return to the Galatia Academy and talk to Provost Baird.", opad); 331 } 332 } 333 334 @Override 335 public boolean addNextStepText(TooltipMakerAPI info, Color tc, float pad) { 336 Color h = Misc.getHighlightColor(); 337 if (currentStage == Stage.CHOOSE_PATH) { 338 // this text doesn't seem necessary here - maybe something simpler? 339 //info.addPara(getGoTalkToPersonText(baird), tc, pad); 340 info.addPara("Find former academician Scylla Coureuse", tc, pad); 341 return true; 342 } else if (currentStage == Stage.INVESTIGATE_FIKENHILD) { 343 344 info.addPara("Talk to associates of Scylla Coureuse on Fikenhild to find a lead to her location" 345 + " or attract attention from someone who knows where she is", tc, pad); 346 return true; 347 } else if (currentStage == Stage.FOLLOW_THE_EXPERIMENTS) { 348 info.addPara(getGoToSystemTextShort(probeSystem) + 349 " and search for the experimental packages possibly being used by Coureuse", tc, pad); 350 return true; 351 } else if (currentStage == Stage.SEARCH_ISIRAH) { 352 info.addPara("Search the Isirah system for Scylla Coureuse, talk to people who might be hiding " 353 + "her, and search for signs of her research.", tc, pad); 354 //info.addPara(getGoToMarketText(loke.getMarket()) + " and pick up the hack device", tc, pad); 355 return true; 356 } else if (currentStage == Stage.CONFRONT_ARCHON) { 357 info.addPara("Confront the archon of Laicaille Habitat about hiding Scylla Coureuse on the station", tc, pad); 358 //info.addPara(getGoToSystemTextShort(relay.getStarSystem()) + " and install hack transmitter " + 359 // "on " + relay.getName() + "", tc, pad); 360 return true; 361 } else if (currentStage == Stage.VISIT_COUREUSE) { 362 info.addPara("Go to the safehouse of Scylla Coureuse and convince her to return to the Galatia Academy", tc, pad); 363 } else if (currentStage == Stage.RETURN_TO_ACADEMY) { 364 info.addPara("Return to the Galatia Academy and talk to Provost Baird", tc, pad); 365 } 366 return false; 367 } 368 369 @Override 370 public String getPostfixForState() { 371 if (startingStage != null) { 372 return ""; 373 } 374 return super.getPostfixForState(); 375 } 376 377 protected void addProbeScavengerFleet() 378 { 379 // Near the star? Okay, hope this works. 380 //SectorEntityToken fleetLocation = probeSystem.getStar(); 381 382 // no reason for the scavenger fleet to exist unless the player is nearby 383 beginWithinHyperspaceRangeTrigger(probeSystem, 3f, false, Stage.FOLLOW_THE_EXPERIMENTS); 384 triggerCreateFleet(FleetSize.SMALL, FleetQuality.LOWER, Factions.SCAVENGERS, FleetTypes.SCAVENGER_MEDIUM, probeSystem); 385 triggerSetFleetOfficers(OfficerNum.FEWER, OfficerQuality.LOWER); 386 triggerSetFleetFaction(Factions.INDEPENDENT); 387 triggerMakeLowRepImpact(); 388 triggerFleetSetAvoidPlayerSlowly(); 389 triggerMakeFleetIgnoredByOtherFleets(); 390 triggerMakeFleetIgnoreOtherFleetsExceptPlayer(); 391 //triggerPickLocationAtClosestToEntityJumpPoint(probeSystem, fleetLocation); 392 triggerPickLocationAtInSystemJumpPoint(probeSystem); // so it's not always the one closest to the star... 393 triggerSetEntityToPickedJumpPoint(); 394 triggerPickLocationAroundEntity(1500); 395 triggerSpawnFleetAtPickedLocation("$gaFCProbe_scavengerPermanentFlag", null); 396 triggerFleetSetTravelActionText("exploring system"); 397 triggerFleetSetPatrolActionText("searching for salvage"); 398 triggerOrderFleetPatrolEntity(false); 399 triggerFleetAddDefeatTrigger("gaFCScavengerDefeated"); 400 triggerSaveGlobalFleetRef("$gaFC_probeScavenger"); 401 // only becomes "important" when player finds empty probe 402 //triggerFleetMakeImportant(null, Stage.SEARCH_ISIRAH); 403 endTrigger(); 404 } 405 406 407 protected void addPatherAmbushFleet() 408 { 409 //SectorEntityToken location = probeSystem.getStar(); 410 beginGlobalFlagTrigger("$gaFC_triggerPatherAmbush", Stage.FOLLOW_THE_EXPERIMENTS); 411 triggerCreateFleet(FleetSize.SMALL, FleetQuality.VERY_LOW, Factions.LUDDIC_PATH, FleetTypes.PATROL_SMALL, probeSystem); 412 //triggerMakeNonHostile(); // should it be hostile? 413 triggerMakeHostileAndAggressive(); 414 triggerMakeLowRepImpact(); 415 triggerFleetPatherNoDefaultTithe(); 416 triggerPickLocationAtClosestToPlayerJumpPoint(probeSystem); 417 triggerSetEntityToPickedJumpPoint(); 418 triggerFleetSetPatrolActionText("waiting"); 419 triggerPickLocationTowardsEntity(null, 15f, getUnits(1.0f)); // towards the jump-point we just picked 420 triggerSpawnFleetAtPickedLocation("$gaFC_patherProbeAmbush", null); 421 triggerSetFleetMissionRef("$gaFC_ref"); // so they can be made unimportant 422 triggerFleetMakeImportant(null, Stage.FOLLOW_THE_EXPERIMENTS); 423 triggerOrderFleetInterceptPlayer(); 424 //triggerFleetAddDefeatTrigger("gaFCPatherAmbushDefeated"); 425 endTrigger(); 426 } 427 428 protected void spawnTriTachMercFleet() 429 { 430 // Doesn't matter which path player took previously - just spawn near Isirah to enhance "Fun". 431 StarSystemAPI isirah = Global.getSector().getStarSystem("isirah"); 432 beginWithinHyperspaceRangeTrigger(isirah, 3f, true, Stage.SEARCH_ISIRAH); 433 triggerCreateFleet(FleetSize.LARGE, FleetQuality.HIGHER, Factions.MERCENARY, FleetTypes.MERC_PRIVATEER, isirah); 434 triggerSetFleetFaction(Factions.INDEPENDENT); 435 triggerSetFleetOfficers(OfficerNum.MORE, OfficerQuality.HIGHER); 436 //triggerAutoAdjustFleetStrengthMajor(); 437 //triggerMakeHostileAndAggressive(); // 438 triggerMakeNonHostile(); 439 //triggerMakeNoRepImpact(); 440 triggerFleetAllowLongPursuit(); 441 triggerSetFleetAlwaysPursue(); 442 //triggerMakeLowRepImpact(); 443 triggerPickLocationTowardsPlayer(isirah.getHyperspaceAnchor(), 90f, getUnits(1.5f)); 444 triggerSpawnFleetAtPickedLocation("$gaFC_isirahMerc", null); 445 triggerOrderFleetInterceptPlayer(); 446 triggerSetFleetMissionRef("$gaFC_ref"); // so they can be made unimportant 447 triggerFleetMakeImportant(null, Stage.SEARCH_ISIRAH); 448 // ^ was CONFRONT_ARCHON - but should come a stage sooner to intercept player before reaching Isirah system 449 endTrigger(); 450 } 451 452 protected void spawnTriTachInvestigators() 453 { 454 // if you sold out Coureuse, put a few random Tri-Tachyon fleets in Isirah system 455 // they'll hang around 'til the end of the mission arc 456 // patrol around Isirah system looking generally suspicious. -dgb 457 458 StarSystemAPI isirah = Global.getSector().getStarSystem("isirah"); 459 // false just so when ctrl-click into isirah they spawn anyway 460 beginWithinHyperspaceRangeTrigger(isirah, 3f, false, Stage.SEARCH_ISIRAH); 461 triggerCreateFleet(FleetSize.MEDIUM, FleetQuality.HIGHER, Factions.TRITACHYON, FleetTypes.MERC_BOUNTY_HUNTER, isirah); 462 triggerSetFleetFaction(Factions.TRITACHYON); 463 triggerSetFleetOfficers(OfficerNum.MORE, OfficerQuality.HIGHER); 464 465 466 triggerFleetSetTravelActionText("traveling"); // this gets shown when they're nearing the system in hyper 467 triggerFleetSetPatrolActionText("searching system"); 468 triggerPickLocationTowardsPlayer(isirah.getHyperspaceAnchor(), 90f, getUnits(1.5f)); 469 triggerSpawnFleetAtPickedLocation("$gaFC_isirahTriTach", null); 470 //triggerOrderFleetInterceptPlayer(); 471 //triggerFleetMakeImportant(null, Stage.CONFRONT_ARCHON); 472 473 triggerOrderFleetPatrol(isirah, true, Tags.OBJECTIVE, Tags.PLANET); // not STATION, otherwise they murder the pirate station -dgb 474 triggerOrderFleetPatrol(); 475 endTrigger(); 476 } 477} 478 479 480 481 482