Starsector API
All Classes Namespaces Files Functions Variables
MercsOnTheRunBarEvent.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.intel.bar.events;
2
3import java.awt.Color;
4
5import com.fs.starfarer.api.campaign.econ.MarketAPI;
6import com.fs.starfarer.api.impl.PlayerFleetPersonnelTracker;
7import com.fs.starfarer.api.impl.campaign.ids.Commodities;
8import com.fs.starfarer.api.impl.campaign.ids.Factions;
9import com.fs.starfarer.api.impl.campaign.ids.Ranks;
10import com.fs.starfarer.api.util.Misc;
11
13
15 super();
16 }
17
18 public boolean shouldShowAtMarket(MarketAPI market) {
19 //if (true) return true;
20
21 if (!super.shouldShowAtMarket(market)) return false;
23
24 if (market.getFactionId().equals(Factions.PIRATES)) {
25 return false;
26 }
27
28 //if (market.getStabilityValue() >= 7) return false;
29
30 return true;
31 }
32
33
34 @Override
39
40 @Override
41 protected String getCommodityId() {
42 return Commodities.MARINES;
43 }
44
45 @Override
46 protected String getPersonFaction() {
47 return Factions.INDEPENDENT;
48 }
49
50 @Override
51 protected String getPersonRank() {
52 return Ranks.GROUND_SERGEANT;
53 }
54
55 @Override
56 protected int computeQuantity() {
57 //int quantity = 10;
58 int quantity = 30 + random.nextInt(21);
59 return quantity;
60 }
61
62 @Override
63 protected float getPriceMult() {
64 return 0.75f;
65 }
66
67 @Override
68 protected String getPrompt() {
69 return "A table of tattooed roughs who bear - to your discerning eye, mil-grade cybermods - are drinking alarming amounts of liquor.";
70 }
71
72 @Override
73 protected String getOptionText() {
74 return "Join the table of tattooed roughs and see if their contract is up";
75 }
76
77 @Override
78 protected String getMainText() {
79 return "You prove yourself worth speaking to by partaking in a round of \"Atmo Drops\", " +
80 "a drink based largely on consuming eye-watering liquor as quickly as possible, " +
81 "with the mercenary band. They're drunk for sure, but are composed enough to speak " +
82 "around the precise details of why they're being investigated by local authorities.\n\n" +
83 "After a couple of the mercs head up to order a round of \"Orbital Bombardments\"," +
84 " their leader pulls you aside and sketches out a proposal. \"We've got %s suits, " +
85 "we fight in vac or black. I'll give you our contract for %s, " +
86 "and that's giving it away. Put us to work, or sell it off elsewhere, doesn't matter to " +
87 "me if you can get us outta this fix. What'dya say?\"";
88 }
89
90 @Override
91 protected String [] getMainTextTokens() {
92 return new String [] { Misc.getWithDGS(quantity), Misc.getDGSCredits(unitPrice * quantity) };
93 }
94 @Override
95 protected Color [] getMainTextColors() {
96 return new Color [] { Misc.getHighlightColor(), Misc.getHighlightColor() };
97 }
98
99 @Override
100 protected String getConfirmText() {
101 return "Buy the mercenary marine contract and sneak them off " + market.getName();
102 }
103
104 @Override
105 protected String getCancelText() {
106 return "Decline the proposal, but stay for an \"Orbital Bombardment\" to soften the blow";
107 }
108
109 @Override
110 protected String getAcceptText() {
111 return "Some clever device provided by the mercs convinces the automated scanners that two " +
112 "particular cargo containers are half-filled with mildly radioactive silicate gravel " +
113 "and nothing else. Your logistics officer sneaks them aboard with no problems.";
114 }
115
116 @Override
117 protected String [] getAcceptTextTokens() {
118 return new String [] { };
119 }
120 @Override
121 protected Color [] getAcceptTextColors() {
122 return new Color [] { };
123 }
124
125 @Override
126 protected String getDeclineText() {
127 return "You wake up the next day in a small room above the bar with no particular memory of how " +
128 "you got there. How many more rounds was it with the mercs, one? Three?";
129 }
130
131// @Override
132// protected String [] getAcceptTextTokens() {
133// return new String [] { };
134// }
135// @Override
136// protected Color [] getAcceptTextColors() {
137// return new Color [] { };
138// }
139
140
141}
142
143
144