diff --git a/MekHQ/src/mekhq/campaign/Campaign.java b/MekHQ/src/mekhq/campaign/Campaign.java index f77df26c7e..95d6e80028 100644 --- a/MekHQ/src/mekhq/campaign/Campaign.java +++ b/MekHQ/src/mekhq/campaign/Campaign.java @@ -307,7 +307,7 @@ public Campaign() { crimeRating = 0; crimePirateModifier = 0; dateOfLastCrime = null; - initiativeBonus = 10; + initiativeBonus = 0; setRankSystemDirect(Ranks.getRankSystemFromCode(Ranks.DEFAULT_SYSTEM_CODE)); forces = new Force(name); forceIds.put(0, forces); @@ -4468,7 +4468,6 @@ private void processReputationChanges() { } public int getInitiativeBonus(){ - System.out.println("reached here"+ initiativeBonus); return initiativeBonus; } public void setInitiativeBonus(int bonus){ @@ -5507,7 +5506,7 @@ public void writeToXML(final PrintWriter pw) { MHQXMLUtility.writeSimpleXMLTag(pw, indent, "lastMissionId", lastMissionId); MHQXMLUtility.writeSimpleXMLTag(pw, indent, "lastScenarioId", lastScenarioId); MHQXMLUtility.writeSimpleXMLTag(pw, indent, "calendar", getLocalDate()); - + MHQXMLUtility.writeSimpleXMLTag(pw, indent, "InitiativeBonus", initiativeBonus); MHQXMLUtility.writeSimpleXMLOpenTag(pw, indent++, "nameGen"); MHQXMLUtility.writeSimpleXMLTag(pw, indent, "faction", RandomNameGenerator.getInstance().getChosenFaction()); MHQXMLUtility.writeSimpleXMLTag(pw, indent, "percentFemale", RandomGenderGenerator.getPercentFemale()); diff --git a/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java b/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java index ec4b0c7806..6f25807d4b 100644 --- a/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java +++ b/MekHQ/src/mekhq/campaign/io/CampaignXmlParser.java @@ -688,6 +688,8 @@ private static void processInfoNode(Campaign retVal, Node wni, Version version) retVal.setRetainerStartDate(LocalDate.parse(wn.getTextContent())); } else if (xn.equalsIgnoreCase("crimeRating")) { retVal.setCrimeRating(Integer.parseInt(wn.getTextContent())); + } else if (xn.equalsIgnoreCase("initiativeBonus")) { + retVal.setInitiativeBonus(Integer.parseInt(wn.getTextContent())); } else if (xn.equalsIgnoreCase("crimePirateModifier")) { retVal.setCrimePirateModifier(Integer.parseInt(wn.getTextContent())); } else if (xn.equalsIgnoreCase("dateOfLastCrime")) {