diff --git a/MekHQ/resources/mekhq/resources/AtBContract.properties b/MekHQ/resources/mekhq/resources/AtBContract.properties index 9875e8c956..79eb4c16ca 100644 --- a/MekHQ/resources/mekhq/resources/AtBContract.properties +++ b/MekHQ/resources/mekhq/resources/AtBContract.properties @@ -37,6 +37,7 @@ batchallStatementGeneric.text="We are The Clans. This world is ours by right. Id batchallCloser.text=

Do you accept the Batchall? responseAccept.text=Accept Batchall responseRefuse.text=Refuse Batchall +responseBringItOn.text=Bring It On -refusalConfirmation.text=Are you sure? This will increase the difficulty of the entire contract. +refusalConfirmation.text=Are you sure? %s will not forget this betrayal. refusalReport.text=
YOU DARE TO REFUSE MY BATCHALL!?!
\ No newline at end of file diff --git a/MekHQ/resources/mekhq/resources/FameAndInfamy.properties b/MekHQ/resources/mekhq/resources/FameAndInfamy.properties new file mode 100644 index 0000000000..a27697b081 --- /dev/null +++ b/MekHQ/resources/mekhq/resources/FameAndInfamy.properties @@ -0,0 +1,482 @@ +# updateFameForFaction +fameChangeReportInfamy.text=You are now at Infamy %s with %s. + +# Batchall Statements +greetingFormatBatchall.text=greeting%s%sLevel%sType%s.text + +greetingCBSLevel0Type0.text=Let us craft a battle worthy of our ancestors. +greetingCBSLevel0Type1.text=Stand proud, and let us clash with all our might. +greetingCBSLevel0Type2.text=Together, let us write a new chapter in history. +greetingCBSLevel1Type0.text=Stand ready, and let us test each other in battle. +greetingCBSLevel1Type1.text=Show us your strength, and may the best prevail. +greetingCBSLevel1Type2.text=Let us meet on the field with honor. +greetingCBSLevel2Type0.text=Defend if you must; it changes nothing. +greetingCBSLevel2Type1.text=We claim what is ours, but your presence hardly matters to us. +greetingCBSLevel2Type2.text=You may stand against us, but it will make no difference in the end. +greetingCBSLevel3Type0.text=Your defense will be as mist before us: fleeting. +greetingCBSLevel3Type1.text=Blood calls for blood, but your efforts barely deserve acknowledgment. +greetingCBSLevel3Type2.text=You oppose Clan Blood Spirit? We shall erase this insult swiftly. +greetingCBSLevel4Type0.text=We have no time for the weak. What pitiful forces dare stand against us? +greetingCBSLevel4Type1.text=Blood calls for blood, yet yours is unworthy of the challenge. Face us if you dare. +greetingCBSLevel4Type2.text=We demand what is ours. Your resistance is nothing but a stain to be washed away. + + +greetingCBLevel0Type0.text=We admire your tenacity. Reveal your defenders, so we may face each other as equals. +greetingCBLevel0Type1.text=yet you stand strong. May this Trial be remembered for your bravery and strength. +greetingCBLevel0Type2.text=We honor your resolve. Let us create a battle that will echo through the ages. +greetingCBLevel1Type0.text=We recognize your strength. Identify your forces, and let us engage in honorable combat. +greetingCBLevel1Type1.text=You have chosen to stand before us. May our Trial be one worthy of remembrance. +greetingCBLevel1Type2.text=We respect your courage. Stand firm and let us see who endures. +greetingCBLevel2Type0.text=We advance. Stand in our way, or do not; it changes nothing. +greetingCBLevel2Type1.text=Your resistance is noted but irrelevant. We take what we desire. +greetingCBLevel2Type2.text=We claim this prize, but your defense holds no significance. +greetingCBLevel3Type0.text=We see little challenge here. Do you truly think you can oppose us? +greetingCBLevel3Type1.text=Your efforts are but a whisper against the strength of stone. Prepare to be ignored. +greetingCBLevel3Type2.text=You are nothing but an inconvenience. We shall cast you aside with ease. +greetingCBLevel4Type0.text=We stand unbroken, unlike your futile defense. +greetingCBLevel4Type1.text=We have endured ages, and you think to stop us? Prepare to be shattered. +greetingCBLevel4Type2.text=Your resistance is as soft as sand. We will grind you to dust. + + +greetingCCCLevel0Type0.text=We marvel at your courage. Declare your defenses, and let us meet in an honorable storm. +greetingCCCLevel0Type1.text=You have shown spirit. Let us see who can stand against the might of the Cobra. +greetingCCCLevel0Type2.text=Your bravery is commendable. Let us create a Trial that will be remembered in history. +greetingCCCLevel1Type0.text=We respect your resolve. Show us your defenses, and face the storm with pride. +greetingCCCLevel1Type1.text=You face us with courage. May this Trial be one of honor. +greetingCCCLevel1Type2.text=You have shown strength. Let us clash and see who stands victorious. +greetingCCCLevel2Type0.text=Stand if you wish; it makes no difference. +greetingCCCLevel2Type1.text=This target is ours. +greetingCCCLevel2Type2.text=You may show yourself, but it will not change the outcome. +greetingCCCLevel3Type0.text=You think to stand before us? We will barely feel your resistance. +greetingCCCLevel3Type1.text=Your presence is an annoyance. We will brush you aside with ease. +greetingCCCLevel3Type2.text=You are unworthy of our attention, but we shall remove you nonetheless. +greetingCCCLevel4Type0.text=What insignificant force dares oppose us? +greetingCCCLevel4Type1.text=You are but insects before the storm. Prepare to be swept away. +greetingCCCLevel4Type2.text=Your defense is a mere breeze against our power. + + +greetingCCOLevel0Type0.text=We admire your strength. Reveal yourselves, and let us engage in a battle worthy of legend. +greetingCCOLevel0Type1.text=You face us with the courage of a warrior. Let this Trial honor both our strengths. +greetingCCOLevel0Type2.text=We honor your tenacity. May this be a hunt that will be sung of for years to come. +greetingCCOLevel1Type0.text=We honor worthy prey. Reveal yourselves, and let us see if you can match our cunning. +greetingCCOLevel1Type1.text=You have shown courage by standing before us. Let us see if you are a worthy challenge. +greetingCCOLevel1Type2.text=We respect your spirit. Meet us in battle, and may the best hunter prevail. +greetingCCOLevel2Type0.text=Whether you stand or flee, it changes nothing. +greetingCCOLevel2Type1.text=You are but another obstacle in our hunt. We shall take what we desire. +greetingCCOLevel2Type2.text=Your defense is noted but irrelevant. We move forward regardless. +greetingCCOLevel3Type0.text=You cannot hope to outwit us. Your resistance is futile. +greetingCCOLevel3Type1.text=Your attempts at defense are laughable. We will tear through them with ease. +greetingCCOLevel3Type2.text=You dare to stand before us? We will enjoy this brief challenge. +greetingCCOLevel4Type0.text=We hunger, and you will be our prey. Resist if you dare. +greetingCCOLevel4Type1.text=You are nothing but a shadow in our path. Prepare to be devoured. +greetingCCOLevel4Type2.text=We hunt without mercy. Your defenses will crumble before us. + + +greetingCDSVersion1Level0Type0.text=Your resolve impresses us. Show your defenses, and let us challenge each other. +greetingCDSVersion1Level0Type1.text=You swim in dangerous waters with courage. Let us see who emerges victorious. +greetingCDSVersion1Level0Type2.text=Your bravery shines like a beacon. Let us create a Trial to be remembered. +greetingCDSVersion1Level1Type0.text=We acknowledge your resolve. Reveal your defenses, and let us cross the void together. +greetingCDSVersion1Level1Type1.text=You have shown courage against the tide. Let us see who truly commands the waters. +greetingCDSVersion1Level1Type2.text=We respect your tenacity. Let this Trial be as deep as the ocean we traverse. +greetingCDSVersion1Level2Type0.text=We continue our hunt. Defend if you must. +greetingCDSVersion1Level2Type1.text=You are but another ripple in the ocean. We will not be deterred. +greetingCDSVersion1Level2Type2.text=We take what we desire. Your defense is unimportant. +greetingCDSVersion1Level3Type0.text=We hardly notice you. What little can you muster? +greetingCDSVersion1Level3Type1.text=You are but a minnow in our ocean. Prepare to be devoured. +greetingCDSVersion1Level3Type2.text=Your defenses will mean nothing. We will consume all. +greetingCDSVersion1Level4Type0.text=We bare our teeth. What worthless forces will you offer? +greetingCDSVersion1Level4Type1.text=Your defense is a minor inconvenience. We will take what is ours. +greetingCDSVersion1Level4Type2.text=You are but fish in the sea. Prepare to be devoured. + +greetingCDSVersion2Level0Type0.text=PLACEHOLDER +greetingCDSVersion2Level0Type1.text=PLACEHOLDER +greetingCDSVersion2Level0Type2.text=PLACEHOLDER +greetingCDSVersion2Level1Type0.text=PLACEHOLDER +greetingCDSVersion2Level1Type1.text=PLACEHOLDER +greetingCDSVersion2Level1Type2.text=PLACEHOLDER +greetingCDSVersion2Level2Type0.text=PLACEHOLDER +greetingCDSVersion2Level2Type1.text=PLACEHOLDER +greetingCDSVersion2Level2Type2.text=PLACEHOLDER +greetingCDSVersion2Level3Type0.text=PLACEHOLDER +greetingCDSVersion2Level3Type1.text=PLACEHOLDER +greetingCDSVersion2Level3Type2.text=PLACEHOLDER +greetingCDSVersion2Level4Type0.text=PLACEHOLDER +greetingCDSVersion2Level4Type1.text=PLACEHOLDER +greetingCDSVersion2Level4Type2.text=PLACEHOLDER + + +greetingCFMLevel0Type0.text=We honor your valor. Show us your defenses, and let us see who burns the brightest. +greetingCFMLevel0Type1.text=You stand before us with courage. Let us create a blaze that will light the path for others. +greetingCFMLevel0Type2.text=Your spirit is strong. May this Trial be as fierce as the flames that guide us. +greetingCFMLevel1Type0.text=We acknowledge your courage. Stand firm, and be tested in the fires of battle. +greetingCFMLevel1Type1.text=You face us with bravery. Let us burn brightly together in this Trial. +greetingCFMLevel1Type2.text=We honor your strength. May our flames clash and reveal who is strongest. +greetingCFMLevel2Type0.text=We burn bright. Defend if you dare, or step aside. +greetingCFMLevel2Type1.text=Your resistance will be consumed all the same. Stand, or do not. +greetingCFMLevel2Type2.text=You matter little to us. We take what is ours, regardless. +greetingCFMLevel3Type0.text=Your efforts barely deserve our notice. +greetingCFMLevel3Type1.text=You are but kindling to our flame. Your resistance will be short-lived. +greetingCFMLevel3Type2.text=We burn brighter than you will ever understand. Stand aside or be consumed. +greetingCFMLevel4Type0.text=You are unworthy of our flame. Prepare to be consumed. +greetingCFMLevel4Type1.text=Your defenses will fuel our fire, leaving nothing but ash. +greetingCFMLevel4Type2.text=We burn through all. What pathetic resistance will you offer? + + +greetingCGBVersion1Level0Type0.text=We are impressed by your resolve. Identify your forces, so that we may share this Trial. +greetingCGBVersion1Level0Type1.text=You have shown the heart of a warrior. Let us test one another in this honored battle. +greetingCGBVersion1Level0Type2.text=Your courage is an inspiration. Together, let us make this a battle to be remembered. +greetingCGBVersion1Level1Type0.text=We respect your strength. Declare your forces, and we will meet you in battle. +greetingCGBVersion1Level1Type1.text=You have shown bravery. Let this be a Trial worthy of our ancestors. +greetingCGBVersion1Level1Type2.text=We acknowledge your courage. Stand before us, and let us see who is truly strong. +greetingCGBVersion1Level2Type0.text=Identify your forces or be forgotten. +greetingCGBVersion1Level2Type1.text=We claim what we desire. Your stand is of little concern. +greetingCGBVersion1Level2Type2.text=We care not for your defense. We will proceed. +greetingCGBVersion1Level3Type0.text=We see through your weakness. Declare your forces, or be removed. +greetingCGBVersion1Level3Type1.text=You amount to little more than a fleeting challenge. Prepare to fall. +greetingCGBVersion1Level3Type2.text=Your efforts are inconsequential. We shall take what is ours. +greetingCGBVersion1Level4Type0.text=We dismiss your efforts. Reveal your forces, or be swept aside. +greetingCGBVersion1Level4Type1.text=You are nothing but prey, and we are the hunters. Identify yourselves. +greetingCGBVersion1Level4Type2.text=Your resistance is beneath notice. Prepare to be obliterated. + +greetingCGBVersion2Level0Type0.text=PLACEHOLDER +greetingCGBVersion2Level0Type1.text=PLACEHOLDER +greetingCGBVersion2Level0Type2.text=PLACEHOLDER +greetingCGBVersion2Level1Type0.text=PLACEHOLDER +greetingCGBVersion2Level1Type1.text=PLACEHOLDER +greetingCGBVersion2Level1Type2.text=PLACEHOLDER +greetingCGBVersion2Level2Type0.text=PLACEHOLDER +greetingCGBVersion2Level2Type1.text=PLACEHOLDER +greetingCGBVersion2Level2Type2.text=PLACEHOLDER +greetingCGBVersion2Level3Type0.text=PLACEHOLDER +greetingCGBVersion2Level3Type1.text=PLACEHOLDER +greetingCGBVersion2Level3Type2.text=PLACEHOLDER +greetingCGBVersion2Level4Type0.text=PLACEHOLDER +greetingCGBVersion2Level4Type1.text=PLACEHOLDER +greetingCGBVersion2Level4Type2.text=PLACEHOLDER + + +greetingCGSLevel0Type0.text=We admire your tenacity. Present your defenses, and let us face each other with honor. +greetingCGSLevel0Type1.text=You have shown great strength. May this Trial be one that is recounted in tales. +greetingCGSLevel0Type2.text=Your resolve shines brightly. Let us make this encounter a legendary one. +greetingCGSLevel1Type0.text=We recognize your bravery. Present your defenses, and face us with honor. +greetingCGSLevel1Type1.text=You have chosen to stand. Let us see if you are worthy of our sting. +greetingCGSLevel1Type2.text=We respect your resolve. Let us engage in a Trial worthy of song. +greetingCGSLevel2Type0.text=We move to strike. Stand or fall; it makes no difference. +greetingCGSLevel2Type1.text=You are but another hindrance. We will claim what we seek. +greetingCGSLevel2Type2.text=Your defenses matter little. We advance regardless. +greetingCGSLevel3Type0.text=We see no challenge. Present your futile defenses. +greetingCGSLevel3Type1.text=You are beneath us, unworthy of our sting. Stand if you must. +greetingCGSLevel3Type2.text=We expected more. Prepare to be crushed. +greetingCGSLevel4Type0.text=We strike. Your defenses will be crushed underfoot. +greetingCGSLevel4Type1.text=You are but insects to us. We claim what is ours. +greetingCGSLevel4Type2.text=There is no place for the weak in our path. Prepare to be stung. + + +greetingCHHLevel0Type0.text=We respect your strength. Stand before us proudly, and let us charge into battle together. +greetingCHHLevel0Type1.text=You have proven yourself worthy. Let us create a Trial that will be told to future generations. +greetingCHHLevel0Type2.text=Your courage matches our own. Let this be a contest of champions. +greetingCHHLevel1Type0.text=We admire your courage. Stand before us, and show your strength against our charge. +greetingCHHLevel1Type1.text=You have proven worthy to face us. Let us clash and see who emerges victorious. +greetingCHHLevel1Type2.text=We honor your bravery. Let our hooves and your defenses meet in glorious battle. +greetingCHHLevel2Type0.text=We charge onward. Whether you stand or not is irrelevant. +greetingCHHLevel2Type1.text=Your efforts do not concern us. We ride forward unimpeded. +greetingCHHLevel2Type2.text=You are but dust beneath our hooves. We take what is ours. +greetingCHHLevel3Type0.text=We find your stand laughable. Who dares face our charge? +greetingCHHLevel3Type1.text=Your defenses are nothing but a hindrance. We will trample you. +greetingCHHLevel3Type2.text=You offer so little. It will be over before you know it. +greetingCHHLevel4Type0.text=We trample over the weak. Who dares claim they can stop us? +greetingCHHLevel4Type1.text=You are but dust beneath our hooves. We will ride through you. +greetingCHHLevel4Type2.text=You are no obstacle, just a fleeting moment before the stampede. + + +greetingCIHLevel0Type0.text=We are impressed by your courage. Reveal your forces, and let us test our mettle. +greetingCIHLevel0Type1.text=You face us with bravery. Let this Trial be as fierce and unyielding as ice. +greetingCIHLevel0Type2.text=Your spirit is admirable. Together, let us create a battle worth remembering. +greetingCIHLevel1Type0.text=We acknowledge your readiness. Reveal your forces, and face the fury of our onslaught. +greetingCIHLevel1Type1.text=You have shown resolve. Let us see if you can withstand our speed and precision. +greetingCIHLevel1Type2.text=We respect your stand. May this Trial be as fierce as the Ice Hellion's bite. +greetingCIHLevel2Type0.text=We descend. Your resistance is of no consequence. +greetingCIHLevel2Type1.text=We strike regardless of your presence. Stand or move aside. +greetingCIHLevel2Type2.text=You mean little to us. We take this prize without delay. +greetingCIHLevel3Type0.text=We regard you with indifference. Stand if you wish, but you will fall. +greetingCIHLevel3Type1.text=You are but a whisper in the wind. We will sweep you away. +greetingCIHLevel3Type2.text=Your resistance is but ice beneath our claws. It will shatter. +greetingCIHLevel4Type0.text=We care not for your resistance. Prepare to be frozen in fear. +greetingCIHLevel4Type1.text=Your defenses will shatter like ice before us. Stand if you wish. +greetingCIHLevel4Type2.text=Our fury is upon you. You will be swept away. + + +greetingCJFLevel0Type0.text=We admire worthy adversaries. Show us your defenses, and face our talons with pride. +greetingCJFLevel0Type1.text=You face us with the heart of a true warrior. Let us make this a battle of legends. +greetingCJFLevel0Type2.text=Your strength inspires us. May this Trial be one that honors both our names. +greetingCJFLevel1Type0.text=We honor worthy opponents. Show us your defenses, and let our talons test your mettle. +greetingCJFLevel1Type1.text=You have chosen to face the Jade Falcon. May your stand be worthy of song. +greetingCJFLevel1Type2.text=We respect your courage. Let us see who earns the sky today. +greetingCJFLevel2Type0.text=We claim this prize. Stand if you choose; it matters not. +greetingCJFLevel2Type1.text=You may defend yourself, but it changes nothing. We will proceed. +greetingCJFLevel2Type2.text=The talons of the Jade Falcon reach forth. Your resistance is trivial. +greetingCJFLevel3Type0.text=We disregard you. Who believes they can stand against us? +greetingCJFLevel3Type1.text=Your defenses are nothing more than a fleeting distraction. +greetingCJFLevel3Type2.text=You are but prey beneath our talons. Prepare to fall. +greetingCJFLevel4Type0.text=We scoff at your pitiful defenses. Prepare to be torn apart. +greetingCJFLevel4Type1.text=You are but prey, awaiting our talons. Reveal yourselves. +greetingCJFLevel4Type2.text=We do not ask; we take. Stand, or be crushed. + + +greetingCMGLevel0Type0.text=We respect your agility. Identify yourselves, and let us test our swiftness together. +greetingCMGLevel0Type1.text=You have shown incredible speed. Let us see who truly commands the hunt. +greetingCMGLevel0Type2.text=We admire your tenacity. May this Trial be one for the annals of history. +greetingCMGLevel1Type0.text=We respect your defenses. Identify yourselves, and let us see who is truly swift. +greetingCMGLevel1Type1.text=You have proven to be quick-witted. Let us match our speed against yours. +greetingCMGLevel1Type2.text=We honor your agility. Stand before us and may the swiftest emerge victorious. +greetingCMGLevel2Type0.text=We move swiftly. Show yourselves, or be ignored. +greetingCMGLevel2Type1.text=Your defenses mean nothing to us. We will take what we seek. +greetingCMGLevel2Type2.text=We move forward, whether you stand or not. It matters little. +greetingCMGLevel3Type0.text=We find you insignificant. Show yourselves, or be hunted down. +greetingCMGLevel3Type1.text=Your presence is barely worth acknowledging. Stand if you must. +greetingCMGLevel3Type2.text=You are nothing but prey in our path. We will strike you down. +greetingCMGLevel4Type0.text=We strike without mercy. You will not stand in our way. +greetingCMGLevel4Type1.text=Your defenses mean nothing. Prepare to be hunted. +greetingCMGLevel4Type2.text=You are but prey in our path. Identify yourselves or be swept aside. + + +greetingCNCLevel0Type0.text=We honor your spirit. Declare your forces, and let us meet our fate together. +greetingCNCLevel0Type1.text=You have faced us without fear. Let this battle be guided by the stars themselves. +greetingCNCLevel0Type2.text=We respect your strength. Together, let us fulfill the vision of this Trial. +greetingCNCLevel1Type0.text=We see strength in you. Declare your forces, and let destiny guide our battle. +greetingCNCLevel1Type1.text=You face us with courage. May this Trial reveal the strength of both our spirits. +greetingCNCLevel1Type2.text=We respect your resolve. Let us fight, as the stars have foreseen. +greetingCNCLevel2Type0.text=We have seen this moment. Your stand is inconsequential. +greetingCNCLevel2Type1.text=We advance as foreseen. Whether you resist changes nothing. +greetingCNCLevel2Type2.text=Your efforts are insignificant. We take what is destined. +greetingCNCLevel3Type0.text=We see your end is near. What futile defense do you offer? +greetingCNCLevel3Type1.text=You stand against destiny. We will put you in your place. +greetingCNCLevel3Type2.text=You will be swept aside as the vision decreed. +greetingCNCLevel4Type0.text=We see only your defeat. Prepare to be extinguished. +greetingCNCLevel4Type1.text=Your resistance is but an illusion. You cannot escape your fate. +greetingCNCLevel4Type2.text=We have foreseen your failure. Stand if you must, but it changes nothing. + + +greetingCSJLevel0Type0.text=We commend your courage. Identify your forces, and let us battle with all our might. +greetingCSJLevel0Type1.text=You have proven yourself worthy of our claws. Let this Trial be one of legends. +greetingCSJLevel0Type2.text=We honor your spirit. May this be a fierce and worthy battle. +greetingCSJLevel1Type0.text=We respect your courage. Identify your forces, and face our fury with pride. +greetingCSJLevel1Type1.text=You stand against us with bravery. Let us see if you can match our ferocity. +greetingCSJLevel1Type2.text=We honor your strength. May this Trial be as fierce as our claws. +greetingCSJLevel2Type0.text=We prowl onward. Your resistance is irrelevant. +greetingCSJLevel2Type1.text=We strike whether you stand or flee. It matters little to us. +greetingCSJLevel2Type2.text=You are but prey, and we will proceed regardless. +greetingCSJLevel3Type0.text=We disregard you. Identify your forces, or be swept away. +greetingCSJLevel3Type1.text=Your defenses are a mere annoyance. We will tear through you. +greetingCSJLevel3Type2.text=You are not worthy of our attention. Prepare to be destroyed. +greetingCSJLevel4Type0.text=Our fury is unmatched. You will not survive. +greetingCSJLevel4Type1.text=Your defenses will crumble before us. Prepare to be annihilated. +greetingCSJLevel4Type2.text=We do not tolerate weakness. Stand and be destroyed. + + +greetingCSRLevel0Type0.text=We admire your bravery. Declare your defenses, and let us soar together in this Trial. +greetingCSRLevel0Type1.text=You face us with courage. May this battle be worthy of the highest peaks. +greetingCSRLevel0Type2.text=Your strength is commendable. Let us create a story that will be told for ages. +greetingCSRLevel1Type0.text=We honor your stand. Declare your forces, and let us test our wings against one another. +greetingCSRLevel1Type1.text=You have shown courage beneath our shadow. May this Trial lift you to the skies. +greetingCSRLevel1Type2.text=We respect your resolve. Let us meet in battle, where the wind favors the worthy. +greetingCSRLevel2Type0.text=Your presence is of no concern to us. +greetingCSRLevel2Type1.text=We glide past your defenses. Stand if you wish; it changes nothing. +greetingCSRLevel2Type2.text=You are but a shadow below. We take what we came for. +greetingCSRLevel3Type0.text=We have no patience for you. Show yourselves, or be scattered. +greetingCSRLevel3Type1.text=You are but a shadow on the snow. We will brush you aside. +greetingCSRLevel3Type2.text=You matter little to us. We will take what we came for. +greetingCSRLevel4Type0.text=We look down upon you. You are unworthy of our notice. +greetingCSRLevel4Type1.text=Your resistance is but a flurry in the storm. Prepare to be blown away. +greetingCSRLevel4Type2.text=We do not wait. Stand or be cast aside. + + +greetingCSALevel0Type0.text=We respect your tenacity. Reveal your defenses, and let us face each other with honor. +greetingCSALevel0Type1.text=You have proven yourself worthy of our strike. Let us make this a Trial to remember. +greetingCSALevel0Type2.text=We admire your strength. Let this encounter be one of the greatest Trials. +greetingCSALevel1Type0.text=We respect your strength. Present your defenses, and prepare for a true challenge. +greetingCSALevel1Type1.text=You face us with bravery. May this Trial be as fierce as our venom. +greetingCSALevel1Type2.text=We acknowledge your strength. Let us see who will earn the right to this prize. +greetingCSALevel2Type0.text=Defend if you wish, but it changes nothing. +greetingCSALevel2Type1.text=You are insignificant to our advance. We strike regardless. +greetingCSALevel2Type2.text=Your resistance is noted but unimportant. We will claim what is ours. +greetingCSALevel3Type0.text=We find you unworthy. Present yourselves, or be crushed. +greetingCSALevel3Type1.text=You are but prey before us. Your resistance will be for nothing. +greetingCSALevel3Type2.text=You stand against us? Prepare to be destroyed. +greetingCSALevel4Type0.text=We strike with venom. You will not survive our bite. +greetingCSALevel4Type1.text=Your defenses are laughable. Prepare to be crushed. +greetingCSALevel4Type2.text=You are prey caught in our coils. Identify yourselves. + + +greetingCSVLevel0Type0.text=We admire your strength. Show yourselves, and let us clash in battle. +greetingCSVLevel0Type1.text=You have faced us with courage. May this Trial prove the strength of both our wills. +greetingCSVLevel0Type2.text=Your resolve is commendable. Let us create a battle that will echo through time. +greetingCSVLevel1Type0.text=We acknowledge your resolve. Stand ready, and let us test our fangs. +greetingCSVLevel1Type1.text=You have shown strength. May this Trial prove who is truly worthy. +greetingCSVLevel1Type2.text=We respect your stand. Let us see who survives this battle of steel. +greetingCSVLevel2Type0.text=We slither forward. Your stand is meaningless. +greetingCSVLevel2Type1.text=You will be crushed whether you resist or not. We will take this prize. +greetingCSVLevel2Type2.text=You are but prey. We advance regardless of your defense. +greetingCSVLevel3Type0.text=We pay you no mind. Reveal your forces, or fall swiftly. +greetingCSVLevel3Type1.text=You will be crushed under our coils. You are but a hindrance. +greetingCSVLevel3Type2.text=You are nothing but prey to be constricted and eliminated. +greetingCSVLevel4Type0.text=We will strike you down. You have no chance to survive. +greetingCSVLevel4Type1.text=Your efforts are futile. We will constrict you until nothing remains. +greetingCSVLevel4Type2.text=You are unworthy of our notice. Prepare to be eradicated. + + +greetingCSLLevel0Type0.text=We honor your courage. Present your defenses, and let us fight with pride. +greetingCSLLevel0Type1.text=You have shown the spirit of a lion. Let us meet in battle, as true warriors. +greetingCSLLevel0Type2.text=We respect your strength. May this be a Trial worthy of our ancestors. +greetingCSLLevel1Type0.text=We respect your courage. Reveal your defenses, and face us with pride. +greetingCSLLevel1Type1.text=You stand before us with bravery. Let us test each other's strength. +greetingCSLLevel1Type2.text=We honor your spirit. Let this Trial determine who is truly worthy. +greetingCSLLevel2Type0.text=Whether you stand or yield means nothing. +greetingCSLLevel2Type1.text=You are but dust in our path. We claim this goal regardless. +greetingCSLLevel2Type2.text=Your defense is but a minor inconvenience. We move forward. +greetingCSLLevel3Type0.text=We find your resistance laughable. Prepare for defeat. +greetingCSLLevel3Type1.text=You will be a mere notch on our claws. Stand if you dare. +greetingCSLLevel3Type2.text=Your defenses are pebbles before us. We will crush you. +greetingCSLLevel4Type0.text=We pounce. You will not survive our fury. +greetingCSLLevel4Type1.text=Your defenses are mere pebbles. We will crush you. +greetingCSLLevel4Type2.text=We show no mercy. Stand and be torn apart. + + +greetingCWILevel0Type0.text=We respect your valor. Declare your forces, and let us engage in worthy combat. +greetingCWILevel0Type1.text=You have shown courage. Let us create a Trial that honors both our legacies. +greetingCWILevel0Type2.text=We admire your strength. Together, let us create a battle that will be sung of. +greetingCWILevel1Type0.text=We respect your valor. Declare your forces, and meet us with dignity. +greetingCWILevel1Type1.text=You have shown courage. May this battle be worthy of our ancestors. +greetingCWILevel1Type2.text=We acknowledge your strength. Let us engage in combat befitting warriors. +greetingCWILevel2Type0.text=Whether you resist or not, you will fall. +greetingCWILevel2Type1.text=Your presence is irrelevant. We take what belongs to us. +greetingCWILevel2Type2.text=You are but another thread in our web. We will take what we want. +greetingCWILevel3Type0.text=We care little for your stand. Declare your forces, or be destroyed. +greetingCWILevel3Type1.text=You will be trapped in our web. Your resistance is futile. +greetingCWILevel3Type2.text=You are but a distraction. We will eradicate you. +greetingCWILevel4Type0.text=You will not survive this encounter. +greetingCWILevel4Type1.text=Your defense is meaningless. Prepare to be swept aside. +greetingCWILevel4Type2.text=You are but prey in our web. Prepare for destruction. + + +greetingCWLevel0Type0.text=We admire your strength. Identify yourselves, and let us meet as true warriors. +greetingCWLevel0Type1.text=You have shown the heart of a warrior. Let this be a Trial that echoes through time. +greetingCWLevel0Type2.text=We respect your spirit. May this be a battle worthy of our ancestors. +greetingCWLevel1Type0.text=We respect the strength of those who stand. Show us your forces, and face us with pride. +greetingCWLevel1Type1.text=You have chosen to face the Wolves. Let us see who earns the right to this land. +greetingCWLevel1Type2.text=We honor your resolve. Let us meet in a battle worthy of legends. +greetingCWLevel2Type0.text=Your resistance is trivial at best. +greetingCWLevel2Type1.text=Stand if you wish; we take this land regardless. +greetingCWLevel2Type2.text=Your defense means nothing. We claim what is ours. +greetingCWLevel3Type0.text=We see only tame dogs before us. You dare to challenge us? +greetingCWLevel3Type1.text=Your defenses are barely worth our time. Stand aside or be destroyed. +greetingCWLevel3Type2.text=You amount to nothing before us. Prepare to be devoured. +greetingCWLevel4Type0.text=We have no patience for the weak. Reveal yourselves. +greetingCWLevel4Type1.text=You are mere sheep before us. Prepare to be devoured. +greetingCWLevel4Type2.text=Your resistance is pitiful. We will tear through you. + + +greetingCWELevel1Type0.text=PLACEHOLDER +greetingCWELevel1Type1.text=PLACEHOLDER +greetingCWELevel1Type2.text=PLACEHOLDER +greetingCWELevel2Type0.text=PLACEHOLDER +greetingCWELevel2Type1.text=PLACEHOLDER +greetingCWELevel2Type2.text=PLACEHOLDER +greetingCWELevel3Type0.text=PLACEHOLDER +greetingCWELevel3Type1.text=PLACEHOLDER +greetingCWELevel3Type2.text=PLACEHOLDER +greetingCWELevel4Type0.text=PLACEHOLDER +greetingCWELevel4Type1.text=PLACEHOLDER +greetingCWELevel4Type2.text=PLACEHOLDER + + +greetingCWIELevel0Type0.text=We are impressed by your resolve. Reveal your defenses, and let us reclaim our honor together. +greetingCWIELevel0Type1.text=You stand before us with courage. Let this Trial be one to remember. +greetingCWIELevel0Type2.text=We admire your bravery. Let us engage in battle as warriors of old. +greetingCWIELevel1Type0.text=We honor worthy defenders. Reveal yourselves, and let us reclaim what is rightfully ours. +greetingCWIELevel1Type1.text=You stand before us with courage. May this Trial be one to remember. +greetingCWIELevel1Type2.text=We respect your strength. Let us engage and determine who truly deserves this place. +greetingCWIELevel2Type0.text=Your efforts are meaningless. +greetingCWIELevel2Type1.text=We reclaim what belongs to us, regardless of your resistance. +greetingCWIELevel2Type2.text=Your presence is of little concern. We will take what is ours. +greetingCWIELevel3Type0.text=We find you irrelevant. Reveal yourselves, or be cast out. +greetingCWIELevel3Type1.text=You have no place before us. We will reclaim what is ours. +greetingCWIELevel3Type2.text=Your defenses are insignificant. We will take back our ground. +greetingCWIELevel4Type0.text=We will reclaim what is ours. +greetingCWIELevel4Type1.text=Your defense means nothing. Stand or be swept away. +greetingCWIELevel4Type2.text=You cannot stop us. Prepare to be eradicated. + + +greetingCEIVersion1Level0Type0.text=PLACEHOLDER +greetingCEIVersion1Level0Type1.text=PLACEHOLDER +greetingCEIVersion1Level0Type2.text=PLACEHOLDER +greetingCEIVersion1Level1Type0.text=PLACEHOLDER +greetingCEIVersion1Level1Type1.text=PLACEHOLDER +greetingCEIVersion1Level1Type2.text=PLACEHOLDER +greetingCEIVersion1Level2Type0.text=PLACEHOLDER +greetingCEIVersion1Level2Type1.text=PLACEHOLDER +greetingCEIVersion1Level2Type2.text=PLACEHOLDER +greetingCEIVersion1Level3Type0.text=PLACEHOLDER +greetingCEIVersion1Level3Type1.text=PLACEHOLDER +greetingCEIVersion1Level3Type2.text=PLACEHOLDER +greetingCEIVersion1Level4Type0.text=PLACEHOLDER +greetingCEIVersion1Level4Type1.text=PLACEHOLDER +greetingCEIVersion1Level4Type2.text=PLACEHOLDER + +greetingCEIVersion2Level0Type0.text=PLACEHOLDER +greetingCEIVersion2Level0Type1.text=PLACEHOLDER +greetingCEIVersion2Level0Type2.text=PLACEHOLDER +greetingCEIVersion2Level1Type0.text=PLACEHOLDER +greetingCEIVersion2Level1Type1.text=PLACEHOLDER +greetingCEIVersion2Level1Type2.text=PLACEHOLDER +greetingCEIVersion2Level2Type0.text=PLACEHOLDER +greetingCEIVersion2Level2Type1.text=PLACEHOLDER +greetingCEIVersion2Level2Type2.text=PLACEHOLDER +greetingCEIVersion2Level3Type0.text=PLACEHOLDER +greetingCEIVersion2Level3Type1.text=PLACEHOLDER +greetingCEIVersion2Level3Type2.text=PLACEHOLDER +greetingCEIVersion2Level4Type0.text=PLACEHOLDER +greetingCEIVersion2Level4Type1.text=PLACEHOLDER +greetingCEIVersion2Level4Type2.text=PLACEHOLDER + + +greetingRDLevel0Type0.text=PLACEHOLDER +greetingRDLevel0Type1.text=PLACEHOLDER +greetingRDLevel0Type2.text=PLACEHOLDER +greetingRDLevel1Type0.text=PLACEHOLDER +greetingRDLevel1Type1.text=PLACEHOLDER +greetingRDLevel1Type2.text=PLACEHOLDER +greetingRDLevel2Type0.text=PLACEHOLDER +greetingRDLevel2Type1.text=PLACEHOLDER +greetingRDLevel2Type2.text=PLACEHOLDER +greetingRDLevel3Type0.text=PLACEHOLDER +greetingRDLevel3Type1.text=PLACEHOLDER +greetingRDLevel3Type2.text=PLACEHOLDER +greetingRDLevel4Type0.text=PLACEHOLDER +greetingRDLevel4Type1.text=PLACEHOLDER +greetingRDLevel4Type2.text=PLACEHOLDER + + +greetingRALevel0Type0.text=PLACEHOLDER +greetingRALevel0Type1.text=PLACEHOLDER +greetingRALevel0Type2.text=PLACEHOLDER +greetingRALevel1Type0.text=PLACEHOLDER +greetingRALevel1Type1.text=PLACEHOLDER +greetingRALevel1Type2.text=PLACEHOLDER +greetingRALevel2Type0.text=PLACEHOLDER +greetingRALevel2Type1.text=PLACEHOLDER +greetingRALevel2Type2.text=PLACEHOLDER +greetingRALevel3Type0.text=PLACEHOLDER +greetingRALevel3Type1.text=PLACEHOLDER +greetingRALevel3Type2.text=PLACEHOLDER +greetingRALevel4Type0.text=PLACEHOLDER +greetingRALevel4Type1.text=PLACEHOLDER +greetingRALevel4Type2.text=PLACEHOLDER + + +greetingCLANLevel0Type0.text=Identify yourselves, and let us share this honorable battle. +greetingCLANLevel1Type0.text=Identify yourselves, and let us meet in honorable battle. +greetingCLANLevel2Type0.text=Stand in our way or not; it changes nothing. +greetingCLANLevel3Type0.text=Identify yourselves, or be erased. +greetingCLANLevel4Type0.text=Identify the forces that dare oppose us, or face immediate destruction. +greetingCLANLevel5Type0.text=Since you have proven yourself unworthy of honor, we will dispense with a formal Batchall. \ No newline at end of file diff --git a/MekHQ/src/mekhq/campaign/Campaign.java b/MekHQ/src/mekhq/campaign/Campaign.java index d78e055cd1..b5e7489a69 100644 --- a/MekHQ/src/mekhq/campaign/Campaign.java +++ b/MekHQ/src/mekhq/campaign/Campaign.java @@ -111,6 +111,8 @@ import mekhq.campaign.universe.PlanetarySystem.PlanetarySystemEvent; import mekhq.campaign.universe.eras.Era; import mekhq.campaign.universe.eras.Eras; +import mekhq.campaign.universe.fameAndInfamy.BatchallFactions; +import mekhq.campaign.universe.fameAndInfamy.FameAndInfamyController; import mekhq.campaign.universe.selectors.factionSelectors.AbstractFactionSelector; import mekhq.campaign.universe.selectors.factionSelectors.DefaultFactionSelector; import mekhq.campaign.universe.selectors.factionSelectors.RangedFactionSelector; @@ -264,6 +266,7 @@ public class Campaign implements ITechManager { private final CampaignSummary campaignSummary; private final Quartermaster quartermaster; private StoryArc storyArc; + private FameAndInfamyController fameAndInfamy; private final transient ResourceBundle resources = ResourceBundle.getBundle("mekhq.resources.Campaign", MekHQ.getMHQOptions().getLocale()); @@ -330,6 +333,7 @@ public Campaign() { campaignSummary = new CampaignSummary(this); quartermaster = new Quartermaster(this); fieldKitchenWithinCapacity = false; + fameAndInfamy = new FameAndInfamyController(); } /** @@ -3589,7 +3593,7 @@ && getCampaignOptions().getRandomDependentMethod().isAgainstTheBot() for (AtBContract contract : getActiveAtBContracts()) { if (campaignOptions.isUseGenericBattleValue()) { if (contract.getStartDate().equals(getLocalDate()) && getLocation().isOnPlanet()) { - if (contract.getEnemy().isClan()) { + if (BatchallFactions.usesBatchalls(contract.getEnemyCode())) { contract.setBatchallAccepted(contract.initiateBatchall(this)); } } @@ -4810,6 +4814,10 @@ public List getCurrentObjectives() { return new ArrayList<>(); } + public FameAndInfamyController getFameAndInfamy() { + return fameAndInfamy; + } + public void writeToXML(final PrintWriter pw) { int indent = 0; @@ -4947,6 +4955,11 @@ public void writeToXML(final PrintWriter pw) { storyArc.writeToXml(pw, indent); } + // Fame and Infamy + if (fameAndInfamy != null) { + fameAndInfamy.writeToXml(pw, indent); + } + // Markets getPersonnelMarket().writeToXML(pw, indent, this); diff --git a/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java b/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java index b0333ec883..0bbc8daf25 100644 --- a/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java +++ b/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java @@ -18,44 +18,12 @@ */ package mekhq.campaign.io; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; - -import javax.xml.parsers.DocumentBuilder; - -import org.apache.commons.lang3.StringUtils; -import org.w3c.dom.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - import megamek.Version; import megamek.client.generator.RandomGenderGenerator; import megamek.client.generator.RandomNameGenerator; import megamek.client.ui.swing.util.PlayerColour; import megamek.common.Entity; -import megamek.common.EntityMovementMode; -import megamek.common.Jumpship; -import megamek.common.Mek; -import megamek.common.MekSummaryCache; -import megamek.common.MiscType; -import megamek.common.Mounted; -import megamek.common.SmallCraft; -import megamek.common.Tank; +import megamek.common.*; import megamek.common.annotations.Nullable; import megamek.common.icons.Camouflage; import megamek.common.weapons.bayweapons.BayWeapon; @@ -63,12 +31,7 @@ import mekhq.MekHQ; import mekhq.NullEntityException; import mekhq.Utilities; -import mekhq.campaign.Campaign; -import mekhq.campaign.CampaignOptions; -import mekhq.campaign.CurrentLocation; -import mekhq.campaign.Kill; -import mekhq.campaign.RandomSkillPreferences; -import mekhq.campaign.Warehouse; +import mekhq.campaign.*; import mekhq.campaign.againstTheBot.AtBConfiguration; import mekhq.campaign.finances.Finances; import mekhq.campaign.force.Force; @@ -81,20 +44,8 @@ import mekhq.campaign.mission.Mission; import mekhq.campaign.mission.Scenario; import mekhq.campaign.mod.am.InjuryTypes; -import mekhq.campaign.parts.EnginePart; -import mekhq.campaign.parts.MekActuator; -import mekhq.campaign.parts.MekLocation; -import mekhq.campaign.parts.MissingEnginePart; -import mekhq.campaign.parts.MissingMekActuator; -import mekhq.campaign.parts.MissingPart; -import mekhq.campaign.parts.Part; -import mekhq.campaign.parts.equipment.AmmoBin; -import mekhq.campaign.parts.equipment.EquipmentPart; -import mekhq.campaign.parts.equipment.HeatSink; -import mekhq.campaign.parts.equipment.MASC; -import mekhq.campaign.parts.equipment.MissingAmmoBin; -import mekhq.campaign.parts.equipment.MissingEquipmentPart; -import mekhq.campaign.parts.equipment.MissingMASC; +import mekhq.campaign.parts.*; +import mekhq.campaign.parts.equipment.*; import mekhq.campaign.personnel.Person; import mekhq.campaign.personnel.PersonnelOptions; import mekhq.campaign.personnel.SkillType; @@ -112,9 +63,18 @@ import mekhq.campaign.universe.Planet.PlanetaryEvent; import mekhq.campaign.universe.PlanetarySystem.PlanetarySystemEvent; import mekhq.campaign.universe.Systems; +import mekhq.campaign.universe.fameAndInfamy.FameAndInfamyController; import mekhq.io.idReferenceClasses.PersonIdReference; import mekhq.module.atb.AtBEventProcessor; import mekhq.utilities.MHQXMLUtility; +import org.apache.commons.lang3.StringUtils; +import org.w3c.dom.*; + +import javax.xml.parsers.DocumentBuilder; +import java.io.*; +import java.time.LocalDate; +import java.util.*; +import java.util.Map.Entry; public class CampaignXmlParser { private static final MMLogger logger = MMLogger.create(CampaignXmlParser.class); @@ -298,6 +258,8 @@ public Campaign parse() throws CampaignXmlParseException, NullEntityException { processSpecialAbilityNodes(retVal, wn, version); } else if (xn.equalsIgnoreCase("storyArc")) { processStoryArcNodes(retVal, wn, version); + } else if (xn.equalsIgnoreCase("fameAndInfamy")) { + processFameAndInfamyNodes(retVal, wn); } else if (xn.equalsIgnoreCase("gameOptions")) { retVal.getGameOptions().fillFromXML(wn.getChildNodes()); } else if (xn.equalsIgnoreCase("kills")) { @@ -957,6 +919,11 @@ private static void processStoryArcNodes(Campaign retVal, Node wn, Version versi retVal.useStoryArc(storyArc, false); } + private static void processFameAndInfamyNodes(Campaign relativeValue, Node workingNode) { + logger.info("Loading Fame and Infamy Nodes from XML..."); + FameAndInfamyController.parseFromXML(workingNode.getChildNodes(), relativeValue); + } + private static void processSpecialAbilityNodes(Campaign retVal, Node wn, Version version) { logger.info("Loading Special Ability Nodes from XML..."); diff --git a/MekHQ/src/mekhq/campaign/mission/AtBContract.java b/MekHQ/src/mekhq/campaign/mission/AtBContract.java index 30403d0e2d..48c59c04ab 100644 --- a/MekHQ/src/mekhq/campaign/mission/AtBContract.java +++ b/MekHQ/src/mekhq/campaign/mission/AtBContract.java @@ -52,6 +52,7 @@ import mekhq.campaign.universe.Faction; import mekhq.campaign.universe.Factions; import mekhq.campaign.universe.RandomFactionGenerator; +import mekhq.campaign.universe.fameAndInfamy.BatchallFactions; import mekhq.utilities.MHQXMLUtility; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -1370,8 +1371,6 @@ public AtBContractRef(int id) { } } - - /** * Initiates a batchall. * Prompts the player with a message and options to accept or refuse the batchall. @@ -1383,130 +1382,51 @@ public boolean initiateBatchall(Campaign campaign) { // Set the title of the dialog String title = resources.getString("incomingTransmission.title"); - // Hold the portrait of the commander - // Generate the batchall statement and fetch the faction image - String batchallStatement; + String batchallStatement = BatchallFactions.getGreeting(campaign, enemyCode); final String PORTRAIT_DIRECTORY = "data/images/force/Pieces/Logos/Clan/"; final String PORTRAIT_FILE_TYPE = ".png"; ImageIcon portrait; switch (enemyCode) { - case "CBS" -> { - batchallStatement = resources.getString("batchallStatementCBS.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Blood Spirit" + PORTRAIT_FILE_TYPE); - } - case "CB" -> { - batchallStatement = resources.getString("batchallStatementCB.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Burrock" + PORTRAIT_FILE_TYPE); - } - case "CCC" -> { - batchallStatement = resources.getString("batchallStatementCCC.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Cloud Cobra" + PORTRAIT_FILE_TYPE); - } - case "CCO" -> { - batchallStatement = resources.getString("batchallStatementCCO.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Coyote" + PORTRAIT_FILE_TYPE); - } + case "CBS" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Blood Spirit" + PORTRAIT_FILE_TYPE); + case "CB" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Burrock" + PORTRAIT_FILE_TYPE); + case "CCC" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Cloud Cobra" + PORTRAIT_FILE_TYPE); + case "CCO" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Coyote" + PORTRAIT_FILE_TYPE); case "CDS" -> { if (campaign.getGameYear() >= 3100) { - batchallStatement = resources.getString("batchallStatementCDSSeaFox.text"); portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Sea Fox" + PORTRAIT_FILE_TYPE); } else { - batchallStatement = resources.getString("batchallStatementCDS.text"); portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Diamond Shark" + PORTRAIT_FILE_TYPE); } } - case "CFM" -> { - batchallStatement = resources.getString("batchallStatementCFM.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Fire Mandrill" + PORTRAIT_FILE_TYPE); - } + case "CFM" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Fire Mandrill" + PORTRAIT_FILE_TYPE); case "CGB" -> { if (campaign.getGameYear() >= 3060) { - batchallStatement = resources.getString("batchallStatementCGBDominion.text"); portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Ghost Bear Dominion" + PORTRAIT_FILE_TYPE); } else { - batchallStatement = resources.getString("batchallStatementCGB.text"); portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Ghost Bear" + PORTRAIT_FILE_TYPE); } } - case "CGS" -> { - batchallStatement = resources.getString("batchallStatementCGS.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Goliath Scorpion" + PORTRAIT_FILE_TYPE); - } - case "CHH" -> { - batchallStatement = resources.getString("batchallStatementCHH.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Hell's Horses" + PORTRAIT_FILE_TYPE); - } - case "CIH" -> { - batchallStatement = resources.getString("batchallStatementCIH.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Ice Hellion" + PORTRAIT_FILE_TYPE); - } - case "CJF" -> { - batchallStatement = resources.getString("batchallStatementCJF.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Jade Falcon" + PORTRAIT_FILE_TYPE); - } - case "CMG" -> { - batchallStatement = resources.getString("batchallStatementCMG.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Mongoose" + PORTRAIT_FILE_TYPE); - } - case "CNC" -> { - batchallStatement = resources.getString("batchallStatementCNC.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Nova Cat" + PORTRAIT_FILE_TYPE); - } - case "CSJ" -> { - batchallStatement = resources.getString("batchallStatementCSJ.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Smoke Jaguar" + PORTRAIT_FILE_TYPE); - } - case "CSR" -> { - batchallStatement = resources.getString("batchallStatementCSR.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Snow Raven" + PORTRAIT_FILE_TYPE); - } - case "CSA" -> { - batchallStatement = resources.getString("batchallStatementCSA.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Star Adder" + PORTRAIT_FILE_TYPE); - } - case "CSV" -> { - batchallStatement = resources.getString("batchallStatementCSV.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Steel Viper" + PORTRAIT_FILE_TYPE); - } - case "CSL" -> { - batchallStatement = resources.getString("batchallStatementCSL.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Stone Lion" + PORTRAIT_FILE_TYPE); - } - case "CWI" -> { - batchallStatement = resources.getString("batchallStatementCWI.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Widowmaker" + PORTRAIT_FILE_TYPE); - } - case "CW" -> { - batchallStatement = resources.getString("batchallStatementCW.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Wolf" + PORTRAIT_FILE_TYPE); - } - case "CWIE" -> { - batchallStatement = resources.getString("batchallStatementCWIE.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Wolf-in-Exile" + PORTRAIT_FILE_TYPE); - } - case "CWOV" -> { - batchallStatement = resources.getString("batchallStatementCWOV.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Wolverine" + PORTRAIT_FILE_TYPE); - } - case "RD" -> { - batchallStatement = resources.getString("batchallStatementRD.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Rasalhague Dominion" + PORTRAIT_FILE_TYPE); - } - case "RA" -> { - batchallStatement = resources.getString("batchallStatementRA.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Raven Alliance" + PORTRAIT_FILE_TYPE); - } - case "SOC" -> { - batchallStatement = resources.getString("batchallStatementSOC.text"); - portrait = new ImageIcon(PORTRAIT_DIRECTORY + "The Society" + PORTRAIT_FILE_TYPE); - } - default -> { - batchallStatement = resources.getString("batchallStatementGeneric.text"); - portrait = new ImageIcon("data/images/force/Pieces/Logos/Inner Sphere/Star League.png"); - } + case "CGS" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Goliath Scorpion" + PORTRAIT_FILE_TYPE); + case "CHH" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Hell's Horses" + PORTRAIT_FILE_TYPE); + case "CIH" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Ice Hellion" + PORTRAIT_FILE_TYPE); + case "CJF" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Jade Falcon" + PORTRAIT_FILE_TYPE); + case "CMG" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Mongoose" + PORTRAIT_FILE_TYPE); + case "CNC" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Nova Cat" + PORTRAIT_FILE_TYPE); + case "CSJ" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Smoke Jaguar" + PORTRAIT_FILE_TYPE); + case "CSR" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Snow Raven" + PORTRAIT_FILE_TYPE); + case "CSA" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Star Adder" + PORTRAIT_FILE_TYPE); + case "CSV" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Steel Viper" + PORTRAIT_FILE_TYPE); + case "CSL" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Stone Lion" + PORTRAIT_FILE_TYPE); + case "CWI" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Widowmaker" + PORTRAIT_FILE_TYPE); + case "CW", "CWE" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Wolf" + PORTRAIT_FILE_TYPE); + case "CWIE" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Clan Wolf-in-Exile" + PORTRAIT_FILE_TYPE); + case "CEI" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Scorpion Empire" + PORTRAIT_FILE_TYPE); + case "RD" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Rasalhague Dominion" + PORTRAIT_FILE_TYPE); + case "RA" -> portrait = new ImageIcon(PORTRAIT_DIRECTORY + "Raven Alliance" + PORTRAIT_FILE_TYPE); + default -> portrait = new ImageIcon("data/images/force/Pieces/Logos/Inner Sphere/Star League.png"); } // Determine the name of the commander based on faction @@ -1520,7 +1440,10 @@ public boolean initiateBatchall(Campaign campaign) { this.getName(), rank, commander, getEnemy().getFullName(campaign.getGameYear()), getSystemName(campaign.getLocalDate())); message = message + batchallStatement; - message = message + resources.getString("batchallCloser.text"); + + if (campaign.getFameAndInfamy().getFameForFaction(enemyCode) < 5) { + message = message + resources.getString("batchallCloser.text"); + } // Create a pane to display both the message and the commander's portrait JTextPane textPane = new JTextPane(); @@ -1533,6 +1456,23 @@ public boolean initiateBatchall(Campaign campaign) { panel.add(imageLabel, BorderLayout.CENTER); panel.add(textPane, BorderLayout.SOUTH); + if (campaign.getFameAndInfamy().getFameForFaction(enemyCode) > 4) { + noBatchallOfferedDialog(panel, title); + return false; + } else { + return batchallDialog(campaign, panel, title); + } + } + + /** + * Display a batchall dialog. + * + * @param campaign the current campaign + * @param panel the panel to display in the dialog + * @param title the title of the dialog + * @return {@code true} if the batchall is accepted, {@code false} otherwise + */ + private boolean batchallDialog(Campaign campaign, JPanel panel, String title) { // Prepare the options for the dialog Object[] options = { resources.getString("responseAccept.text"), @@ -1547,7 +1487,8 @@ public boolean initiateBatchall(Campaign campaign) { if (batchallDialog == JOptionPane.NO_OPTION) { // Display the dialog and capture the response int refusalConfirmation = JOptionPane.showOptionDialog(null, - resources.getString("refusalConfirmation.text"), + String.format(resources.getString("refusalConfirmation.text"), + getEnemy().getFullName(campaign.getGameYear())), resources.getString("responseRefuse.text"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]); @@ -1556,6 +1497,7 @@ public boolean initiateBatchall(Campaign campaign) { if (refusalConfirmation == JOptionPane.NO_OPTION) { // Report refusal of the batchall campaign.addReport(resources.getString("refusalReport.text")); + campaign.getFameAndInfamy().updateFameForFaction(campaign, enemyCode, -1); return false; } else { return true; @@ -1564,4 +1506,20 @@ public boolean initiateBatchall(Campaign campaign) { return true; } } + + /** + * Displays a dialog with a message for when the faction has refused to offer a Batchall due to + * past player refusals. + * + * @param panel The panel to display in the dialog. + * @param title The title of the dialog. + */ + private void noBatchallOfferedDialog(JPanel panel, String title) { + Object[] options = { + resources.getString("responseBringItOn.text") + }; + + JOptionPane.showOptionDialog(null, panel, title, JOptionPane.DEFAULT_OPTION, + JOptionPane.QUESTION_MESSAGE, null, options, options[0]); + } } diff --git a/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/BatchallFactions.java b/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/BatchallFactions.java new file mode 100644 index 0000000000..aecb6c1c1d --- /dev/null +++ b/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/BatchallFactions.java @@ -0,0 +1,107 @@ +package mekhq.campaign.universe.fameAndInfamy; + +import megamek.codeUtilities.MathUtility; +import megamek.common.Compute; +import mekhq.MekHQ; +import mekhq.campaign.Campaign; + +import java.util.List; +import java.util.ResourceBundle; + +/** + * Provides utility methods for working with clan factions within the Fame and Infamy module: + * determining whether they engage in batchalling, retrieving greetings and version strings for + * factions based on various conditions, such as the faction code, infamy level, and current year. + *

+ * The class is stateless and all methods are static, so it doesn't need to be instantiated. + * Therefore, all of its methods can be called directly on the class. + */ +public class BatchallFactions { + private static final ResourceBundle resources = ResourceBundle.getBundle( + "mekhq.resources.FameAndInfamy", + MekHQ.getMHQOptions().getLocale()); + + /** + * Determines whether a given faction engages in batchalling. + * + * @param factionCode The faction code to check eligibility for. Must be a non-null {@link String}. + * @return {@code true} if the faction code engages in batchalling, {@code false} otherwise. + */ + public static boolean usesBatchalls(String factionCode) { + if (factionCode == null) { + return false; + } + + List factionCodes = List.of("CBS", "CB", "CCC", "CCO", "CDS", "CFM", "CGB", + "CGS", "CHH", "CIH", "CJF", "CMG", "CNC", "CSJ", "CSR", "CSA", "CSV", "CSL", "CWI", "CW", + "CWE", "CWIE", "CEI", "RD", "RA", "CP", "AML", "CLAN"); + + return factionCodes.contains(factionCode); + } + + /** + * Retrieves the greeting for faction based on infamy. + * + * @param campaign The campaign for which to retrieve the greeting. + * @param factionCode The faction code for which to retrieve the greeting. + * @return The greeting message as a {@link String}. + */ + public static String getGreeting(Campaign campaign, String factionCode) { + final int infamy = MathUtility.clamp(campaign.getFameAndInfamy().getFameLevelForFaction(factionCode), + 0, 5); + + String version = getVersionString(campaign.getGameYear(), factionCode); + + String greeting; + int type = 0; + + if (infamy == 5) { + greeting = resources.getString("greetingCLANLevel5Type0.text"); + } else { + if (!factionCode.equals("CLAN")) { + type = Compute.randomInt(3); + } + String greetingReference = String.format(resources.getString("greetingFormatBatchall.text"), + factionCode, version, infamy, type); + greeting = resources.getString(greetingReference); + } + + return '"' + greeting + '"'; + } + + /** + * Retrieves the version string based on the given faction code and current year. + * + * @param currentYear The current year as an {@link Integer}. + * @param factionCode The faction code as a {@link String}. + * @return The version {@link String} for the given faction code and current year. + */ + private static String getVersionString(int currentYear, String factionCode) { + switch (factionCode) { + case "CDS" -> { + if (currentYear < 3100) { + return "Version 1"; + } else { + return "Version 2"; + } + } + case "CGB" -> { + if (currentYear < 3060) { + return "Version 1"; + } else { + return "Version 2"; + } + } + case "CEI" -> { + if (currentYear < 3141) { + return "Version 1"; + } else { + return "Version 2"; + } + } + default -> { + return ""; + } + } + } +} diff --git a/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/FameAndInfamyController.java b/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/FameAndInfamyController.java new file mode 100644 index 0000000000..c24aca0ab7 --- /dev/null +++ b/MekHQ/src/mekhq/campaign/universe/fameAndInfamy/FameAndInfamyController.java @@ -0,0 +1,181 @@ +package mekhq.campaign.universe.fameAndInfamy; + +import megamek.codeUtilities.MathUtility; +import megamek.logging.MMLogger; +import mekhq.MekHQ; +import mekhq.campaign.Campaign; +import mekhq.campaign.universe.Factions; +import mekhq.utilities.MHQXMLUtility; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.File; +import java.io.PrintWriter; +import java.util.*; + +import static java.lang.Math.round; + +public class FameAndInfamyController { + private Map trackingFactions; + + private static final ResourceBundle resources = ResourceBundle.getBundle( + "mekhq.resources.FameAndInfamy", + MekHQ.getMHQOptions().getLocale()); + + private final static MMLogger logger = MMLogger.create(FameAndInfamyController.class); + + /** + * Constructor for the {@link FameAndInfamyController} class. + * Initializes the {@code trackingFactions} map with the provided map of factions. + * If any factions are missing from the provided map, they will be added with a default fame + * value of 3.0 (or 0.0 if the provided faction uses Batchalls). + */ + public FameAndInfamyController() { + this.trackingFactions = new HashMap<>(); + for (String shortName : getAllFactionShortnames()) { + if (BatchallFactions.usesBatchalls(shortName)) { + this.trackingFactions.put(shortName, 0.0); + } else { + this.trackingFactions.put(shortName, 2.0); + } + } + } + + /** + * Retrieves the shortnames of all factions from the XML file. + * + * @return A list of faction shortnames. + */ + public List getAllFactionShortnames() { + List shortnames = new ArrayList<>(); + + try { + File inputFile = new File("data/universe/factions.xml"); + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(inputFile); + doc.getDocumentElement().normalize(); + + NodeList nList = doc.getElementsByTagName("shortname"); + + for (int temp = 0; temp < nList.getLength(); temp++) { + Node nNode = nList.item(temp); + + if (nNode.getNodeType() == Node.ELEMENT_NODE) { + Element element = (Element) nNode; + shortnames.add(element.getTextContent()); + } + } + } catch (Exception e) { + logger.error(String.format("FameAndInfamyController failed to parse contents of 'shortname'" + + " in 'data/universe/factions.xml'. Last successfully parsed Faction shortname: %s", + shortnames.get(shortnames.size() - 1))); + return shortnames; + } + + return shortnames; + } + + /** + * Retrieves the precise fame value for a given faction. + * Normally we don't care what the exact value is, + * so {@code getFameLevelForFaction} should be used, instead. + * + * @param factionCode the code of the faction + * @return the fame value for the faction + */ + public double getFameForFaction(String factionCode) { + return trackingFactions.get(factionCode); + } + + /** + * Retrieves the fame level for a faction. This is determined by normally rounding raw fame to + * the nearest {@link Integer} + * + * @param factionCode The code of the faction. + * @return The fame level of the faction. + */ + public int getFameLevelForFaction(String factionCode) { + return (int) round(trackingFactions.get(factionCode)); + } + + /** + * Sets the fame value for a specific faction. + * + * @param factionCode The code representing the faction. + * @param fame The fame value to be set for the faction. + */ + public void setFameForFaction(String factionCode, double fame) { + fame = MathUtility.clamp(fame, 0.0, 5.0); + + trackingFactions.put(factionCode, fame); + } + + /** + * Updates the fame of a faction by a specified adjustment. + * + * @param factionCode The code representing the faction. + * @param campaign The current campaign. + * @param adjustment The adjustment to be made to the faction's fame. + */ + public void updateFameForFaction(Campaign campaign, String factionCode, double adjustment) { + int originalFame = getFameLevelForFaction(factionCode); + + double currentFame = trackingFactions.get(factionCode); + adjustment = currentFame + adjustment; + adjustment = MathUtility.clamp(adjustment, 0.0, 5.0); + + trackingFactions.put(factionCode, adjustment); + + int newFame = getFameLevelForFaction(factionCode); + + if (originalFame != newFame) { + campaign.addReport(String.format(resources.getString("fameChangeReportInfamy.text"), + newFame, Factions.getInstance().getFaction(factionCode).getFullName(campaign.getGameYear()))); + } + } + + /** + * Writes the fame and infamy data to an XML file using the provided {@link PrintWriter} and indent level. + * + * @param printWriter The {@link PrintWriter} used to write to the XML file. + * @param indent The indent level for formatting the XML file. + */ + public void writeToXml(PrintWriter printWriter, int indent) { + MHQXMLUtility.writeSimpleXMLOpenTag(printWriter, indent++, "fameAndInfamy"); + for (String trackedFaction : trackingFactions.keySet()) { + double factionFame = trackingFactions.get(trackedFaction); + boolean shouldWrite = factionFame != (BatchallFactions.usesBatchalls(trackedFaction) ? 0 : 2); + + if (shouldWrite) { + MHQXMLUtility.writeSimpleXMLTag(printWriter, indent, trackedFaction, getFameForFaction(trackedFaction)); + } + } + MHQXMLUtility.writeSimpleXMLCloseTag(printWriter, --indent, "fameAndInfamy"); + } + + /** + * Parses the XML {@link NodeList} and updates the fame values for factions in a {@link Campaign}. + * + * @param nodeList The XML {@link NodeList} containing the faction fame values. + * @param campaign The {@link Campaign} object to update with the parsed fame values. + */ + public static void parseFromXML(final NodeList nodeList, Campaign campaign) { + FameAndInfamyController fameAndInfamy = campaign.getFameAndInfamy(); + try { + for (int x = 0; x < nodeList.getLength(); x++) { + final Node workingNode = nodeList.item(x); + if (workingNode.getNodeType() == Node.ELEMENT_NODE) { + double value = Double.parseDouble(workingNode.getTextContent()); + fameAndInfamy.setFameForFaction(workingNode.getNodeName(), value); + } + } + } catch (Exception e) { + logger.error(e); + } + } +}