001package com.fs.starfarer.api.impl.campaign.intel.bar.events;
002
003import java.awt.Color;
004
005import com.fs.starfarer.api.Global;
006import com.fs.starfarer.api.campaign.PersonImportance;
007import com.fs.starfarer.api.campaign.econ.MarketAPI;
008import com.fs.starfarer.api.characters.PersonAPI;
009import com.fs.starfarer.api.impl.campaign.ids.Ranks;
010import com.fs.starfarer.api.impl.campaign.ids.Tags;
011import com.fs.starfarer.api.util.Misc;
012
013public class TriTachMajorLoanBarEvent extends TriTachLoanBarEvent {
014        
015        public static int REPAYMENT_DAYS_MAJOR = 500;
016        
017        public TriTachMajorLoanBarEvent() {
018                super();
019        }
020        
021        @Override
022        protected void regen(MarketAPI market) {
023                if (this.market == market) return;
024                
025                super.regen(market);
026                
027                
028                loanAmount = 1000000 + random.nextInt(6) * 100000;
029                repaymentAmount = (int) (loanAmount * 1.5f);
030                repaymentDays = REPAYMENT_DAYS_MAJOR;
031        }
032        
033// do this after load is repaid
034//      @Override
035//      protected void doExtraConfirmActions() {
036//              ContactIntel.addPotentialContact(person, market, text);
037//      }
038
039        @Override
040        protected void adjustPerson(PersonAPI person) {
041                person.setImportanceAndVoice(PersonImportance.VERY_HIGH, random);
042                person.addTag(Tags.CONTACT_TRADE);
043                person.addTag(Tags.CONTACT_MILITARY);
044        }
045        
046        @Override
047        protected String getPersonPost() {
048                return Ranks.POST_SENIOR_EXECUTIVE;
049        }
050        
051        
052        @Override
053        protected void createIntel() {
054                TriTachLoanIntel intel = new TriTachLoanIntel(this, market);
055                intel.setMajorLoan(true);
056                Global.getSector().getIntelManager().addIntel(intel, false, dialog.getTextPanel());
057        }
058
059        @Override
060        protected String getPrompt() {
061                return "A Tri-Tachyon executive sits in a private booth, scrolling through " + getHisOrHer() + " TriPad. An untouched drink sits on the immaculate table.";
062        }
063        
064        @Override
065        protected String getOptionText() {
066                return "Throw some credits around like a big spender, to see if you can attract the executive's attention";
067        }
068        
069        @Override
070        protected String getMainText() {
071                return "An impeccable Tri-Tachyon factioneer of completely indeterminate age has you invited to " +
072                                getHisOrHer() + " booth. " + Misc.ucFirst(getHeOrShe()) + " appraises you coolly as " +
073                                getHeOrShe() + " fills a glass from a bottle that looks to cost more than many starships.";
074
075        }
076        
077        @Override
078        protected String getMainText2() {
079                return 
080                "\"The vintage predates the Collapse, you know,\" " + getHeOrShe() + " says. " +
081                "\"I enjoy the idea of owning a small part of history.\" " + Misc.ucFirst(getHeOrShe()) + 
082                " smiles, \"So let's talk about you.\" As " + getHeOrShe() + " lists detailed specifications " +
083                "and statistical trends regarding your career in the Persean Sector you make a mental " +
084                "note to have a discussion with your senior officers on the subject of " +
085                "information security. \"So,\" " + getHeOrShe() + " concludes, \"I'd like to see " +
086                "what you could accomplish with a short-term capital infusion of let us say %s. " +
087                "To incentivize the ruthless enterprise I so admire, let us say you would repay %s " +
088                "within %s days.\n\n" + 
089                
090                "You take this in as you sip your drink. " +
091                "It's a lot of money. You also consider that this Tri-Tach suit paid too much for the bottle.";
092                
093        }
094        
095        @Override
096        protected String [] getMainText2Tokens() {
097                return new String [] { Misc.getDGSCredits(loanAmount), Misc.getDGSCredits(repaymentAmount), 
098                                                           "" + (int)repaymentDays };
099        }
100        @Override
101        protected Color [] getMainText2Colors() {
102                return new Color [] { Misc.getHighlightColor(), Misc.getHighlightColor(), Misc.getHighlightColor() };
103        }
104        
105        @Override
106        protected String getConfirmText() {
107                return "Accept the deal and toast your joint venture";
108        }
109        
110        @Override
111        protected String getCancelText() {
112                return "Decline the deal, explaining that you're \"just here to network\"";
113        }
114
115        @Override
116        protected String getNegotiatedText() {
117                return "As the negotiations conclude, the Tri-Tachyon " + getManOrWoman() + " leans back, rolling the stem of " +
118                                getHisOrHer() + " glass between " + getHisOrHer() + " fingertips. " +
119                           "\"You didn't accept my initial offer\", " + getHeOrShe() + " says. \"I find that reassuring.\"";
120        }
121        
122        @Override
123        protected String getAcceptText() {
124                return "You leave the lounge rich in credits, having exchanged secure comm keys with the " +
125                                "Tri-Tachyon shark and receiving the transfer immediately. Your head spins with plans " +
126                                "for how to leverage your new assets - and a bit from the drink, you admit to yourself.";
127        }
128
129}
130
131
132