mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Add Defensive pact (#9900)
* Defensive Pacts can now be offered. * Signing a defensive pact now makes the Civs join all defensive wars. Any future defensive wars will force the other civ to join. * Removed Popup Alert Defensive Pact. * Defensive pact and Research pact now are only on the trade screen. * AI now offers defensive pacts. * Added AI evaluating sending and receiving Defensive Pact offers. * Reverted some temporary changes * Reduced the chance an AI offers a defensive pact * Starting an offensive war now cancels all Defensive Pacts with other civilisations. * Removed extra requirements before an AI will sign or offer a defensive pact. * Added Defensive Pacts to the Civilopedia. * Fixed the AI counter offering with treaties. * Fixed a test using the old method of checking if a civ is at war. * Fixed a previous refactor error. * Deleted commented out Research Agreement button code. * Fixed some spelling errors and remnant debugging code. * Removed signing a defensive pact brings both Civ's into each others previous defensive wars. * Refactored setFriendshipBasedModifier to look better * Starting an offensive war now removes the defensive pact form both sides. * Reverted changes to DiplomaticStatus * Removed extra technology check to sign a defensive pact. * Removed DiplomacyManager.isAtWar() completely. * Moved setting defensivePact flags from TradeLogic.transferTrade() to DiplomacyManager.signDefensivePact. * Changed diplomatic modifiers related to Defensive Pacts to be less extreme. * Fixed canceling Defensive Pacts when declaring war and notifying other Civs. * Updated the Defensive Pact entry in the Civilopedia and fixed some spelling. * Fixed Defensive Pact behavior while attacking and defending. * Changed a variable to a more readable name. * Improved readability of setFriendshipBasedModifier(). * Moved the important onWarDeclared functionality to their own functions. * Added a notification for the attacking Civ when a Civ joins war through a Defensive Pact. * Refactored setDefensivePactBasedModifier() to be more readable. * Increased DeclinedDefensivePact time. * Deleted old commented code that removed the research agreement button. * Fixed having reverting changes errors in UnitMovementTests. * Refactored breaking treaties when declaring war. * Removed unnecessary semicolons.
This commit is contained in:
@ -234,7 +234,8 @@
|
||||
"name": "Chivalry",
|
||||
"row": 6,
|
||||
"prerequisites": ["Civil Service","Guilds"],
|
||||
"quote": "'Whoso pulleth out this sword of this stone and anvil, is rightwise king born of all England.' - Malory"
|
||||
"uniques": ["Enables Defensive Pacts"],
|
||||
"quote": "'Whoso pulleth out this sword of this stone and anvil, is rightwise king born of all England.' - Malory"
|
||||
},
|
||||
{
|
||||
"name": "Machinery",
|
||||
|
@ -214,8 +214,9 @@
|
||||
"name": "Chivalry",
|
||||
"row": 5,
|
||||
"prerequisites": ["Civil Service","Currency","Horseback Riding"],
|
||||
"uniques": ["Enables Defensive Pacts"],
|
||||
"quote": "'Whoso pulleth out this sword of this stone and anvil, is rightwise king born of all England.' - Malory"
|
||||
}, // Allows for defensive pacts
|
||||
},
|
||||
{
|
||||
"name": "Machinery",
|
||||
"row": 8,
|
||||
|
@ -198,6 +198,14 @@
|
||||
"The amount of ⍾Science you receive at the end is dependent on the ⍾Science generated by your cities and the other civilization's cities during the agreement - the more, the better!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Defensive Pacts",
|
||||
"steps": [
|
||||
"Defensive pacts allow you and another civ to protect one another from aggressors.\nOnce the defensive pact is signed, you will be drawn into their future defensive wars, just as they will be drawn into your future defensive wars. Declaring war on any Civ will remove all of your defensive pacts. You will have to re-sign them to use their effect.",
|
||||
"Be cautious when signing defensive pacts because they can bring you into wars that you might not want to be in.",
|
||||
"The AI is very careful and will not accept defensive pacts with less than 80 attitude."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "City-States",
|
||||
"steps": [
|
||||
|
Reference in New Issue
Block a user