Attacking & Defending

To succesfully attack your total modified offence sent on an attack must be more than the Modified defense of the target province. 
==Military Efficiency==
Military efficiency affects the strength of military units, both for offence and defense. 
===Base Military Efficiency===
 Base Military Efficiency = ( 33 + 67 * ( Effective Wage Rate / 100 ) 0.25 ) * Ruby Dragon * Multi-Attack Protection Bonus
*Rounded to one decimal point, it should return the most accurate values. Effective Wage Rate lies between 20% (77.8% Efficiency) to 200% (112.7% Efficiency).
*While wages can be changed instantly, the effective wage rate used for base military efficiency changes slowly per tick. It takes approximately 96hrs to go from 20% wages to max at 200% wages.
*Effective Wage Rate Formula = (Final Wage Rate - Previous Wage Rate)* 0.05 - Previous Wage Rate
*Changes in Military Efficiency and Wage Rate:
 Change in Effective Wage Rate = 0.05 * (Wage Rate Paid - Effective Wage Rate)
*If wages were not fully paid in the previous tick, Wage Rate Paid will be set at minimum regardless of the amount of wages actually paid.
===Offensive Military Efficiency===
 OME = (Base Military Efficiency + Training Grounds Bonus + Honor Bonus) * Science Bonus * Race Bonus * Personality Bonus * Fanaticism * Bloodlust * Ritual * Stance
===Defensive Military Efficiency===
 DME = (Base Military Efficiency + Forts Bonus + Honor Bonus) * Science Bonus * Race Bonus * Personality Bonus * Minor Protection * Greater Protection * Fanaticism * Plague * Ritual * Stance
==Attacking==
Raw offence is the base attacking strength of a province's units (ambush is an exception to this, described separately below). The modified offence is the province's raw offense modified by Offensive military efficiency and any bonus generals. 
===Raw Offense===
 Raw Off = (Soldiers * (Soldier Off value + Aggression)) + (Offensive Specs * Off Spec Attack value) + (Elites * Elite Attack value) + (Horses * War Horse Attack value) + [(Mercs * Attack Value + Prisoners * Attack Value)]
===Modified Offense===
 Mod Off = Raw Offense * (OME + (5% * Generals sent -1))
==Defending==
 Raw Defense = (Defense Specs * Def Spec Points) + (Elites at Home * Elite's Defense) + (Soldiers * Sold Def Points * Aggression) + Townwatch
 Mod Defense = MAX ( Raw Defense * Defensive Military Efficiency , Land )
===Minimum Defense===
*All land is protected by a minimum of 1 defense per Acre.
That is, if you should send every single Elite and General out, and release your Defense Specialists, an opponent would still need to send 1 Offense point per Acre to conduct a successful attack against you.
This does not apply to Intra-Kingdom attacks.
== War room ==
The war room page allows you to select an attack target, the troops to send on an attack, the number of generals to send and any attack time modifier.
The war room will automatically fill the target defence from the new intel site:
* Defence from an SOT will show if only an SOT exists.
* If any SOM or SOD exists, the most recent will be used. Any more recent SOT will be ignored if an SOM or SOD exists. This means if a player knows a targets army is at home e.g. A TM, the war room will use any SOD or SOM and a fresh SOT will not update defence automatically filled. 
* For ambush defence the new intel site shows accurate ambush values (accurate at the time intel was taken). The old intel site and bot are not being updated and may show incorrect ambush values as elite and spec values have not been updated for recent ages).
== Attack Times ==
 Attack Time = Base Attack Time * Race Bonus * Personality Bonus * Barracks Bonus * Quick Feet * Attack Type * War * NW Mod * Ritual Bonus
*Note: War Attack Speed phases in to -15%, after 12 hours of War have passed.
*There is a net worth value adjustment for attack times. This adjustment compares your net worth to the net worth of the province you are planning to attack. If these are close to each other the base attack times as given below are used. If the net worth differs, then the base attack time is multiplied, so your attack time is longer. This does not affect intra-KD attacks or in War.
====Base Attack Time====
The base attack time is 14 hours to attack other KDs and 7 hours to attack your own KD. This is the value all calculations are based upon. 
====Minimum Offense to Win====
To guarantee a win, you must send Mod Offense that is at least 1 greater than the defender's Mod Defense. By default the war room auto-populates offence to 1% more than target defence.
On Conquest attacks, the minimum Offense to win is 51% of the opponents Defense.
==Attack Types and Gains==
For Attacks that target and capture Resources (Traditional March, Conquest, Plunder, Learn), the Gains are calculated as follows:
 <B>Gains</B> = Target Resource * Attack Type * RPNW * RKNW * Multi-Attack Protection * Race Modifier * Personality Modifier * Castles Protection * Relations * Siege Science * Emerald Dragon * Attack Time Adjustment Factor * Ritual Bonus * Anonymity * Mist * Stance * MAP
*Resources are defined as: Land, Gold Coins, Food, Runes, Science Books
*Land attacks (except Ambush) also reward Military Credits (target's Defense Points *.008 * relative NW * Military Credits mod) and Building Credits (Acres captured * 0.4 * relative NW * Building Credits mod).
*Massacre and Raze attacks ignore most Resource Gains modifiers, except RPNW, RKNW, Relations, Multi-Attack Protection and the Attack Time Adjustment Factor.
*
*Massacre is affected by Massacre Damage mod.
*Ambush ignores all modifiers except Ambush Protection.
 	Base Gains	Gains Cap	
Traditional
Match	12% land
7% peasants	20% land 	
Conquest	decreased from 6.8% in proportion to
the relative Off vs def sent	6.8% 	
Raze 	~5% Land
~30% Buildings (War)	 	
Plunder 	50% gold
60% food,
60% runes	67.5% gold
81% runes,
81% food	
Ambush 	50% 	50% 	
Learn 	~2% allocated
~20% unallocated	 	
Massacre	9.5% peasants, 
7.5% Thieves, 
5% Wizards	WAR 
28.5% peasants, 
22.5% Thieves 
15% Wizards	
===Province Networth Factor===
 Relative Province Networth (rpnw) = Targets Networth / Self Networth
 
 Province Networth Factor = DEPEND ( rpnw ) :
 rpnw < 0.567 = 0
 0.567 < rpnw < 0.9 = 3 * rpnw - 1.7
 0.9 < rpnw < 1.1 = 1
 1.1 < rpnw < 1.6 = -2 * rpnw + 3.2
 rpnw > 1.6 = 0
===Kingdom Networth Factor===
 Relative Kingdom Networth (rknw) = Target Kingdom Average Prov. Networth / Self Kingdom Average Prov. Networth
 
 Kingdom Networth Factor = DEPEND ( rknw ) :
 rknw < 0.5 = 0.8
 0.5 < rknw < 0.9 = rknw / 2 + 0.55
 rknw > 0.9 = 1
NOTE: RKNW is based on the Average Province size of the Kingdom.
===Attack Time Adjustment Factor===
Adding or subtracting hours modifies the Gains (based on your Attack Time), as follows:
Hours 	Gains Modifier %
(-2 / base attack time) * 160%	
(-1 / base attack time) * 150%	
(1 / base attack time) * 80% 	
(2 / base attack time) * 70% 	
(3 / base attack time) * 60% 	
(4 / base attack time) * 50% 	
===Attack Type===
====Traditional March====
Base gains are 12% and are capped at 20% of your Acres or your opponent's Acres, whichever is smaller.
====Ambush====
Will return 50% of the Acres lost in the attack. Unaffected by Gains modifiers. Inflicts 15% increased Military Casualties.
Ambush uses the raw offence sent which must before than 80% of the defence from the target armies troops. 
```Raw Offense Required = [(Target's Elites sent*Racial Elite Defense Value) + (Target's Offspecs Sent*Racial Defspec Value) + (Target's Soldiers sent*Racial Soldier Offense Value)] * 0.8
====Plunder====
Base gains are 50% gold, 60% food and 60% runes. Max gains is 1.75x base (67.5% gold, 81% runes/food). Military Casualties on Plunder defense are reduced by 50%.
====Learn====
Steals ~2% of target's allocated Books, plus ~20% of the target's unallocated Books. Military Casualties on Learn defense are reduced by 50%. 
During War, Learn temporarily removes ~30% of total allocated Science Books, these return over 48 Ticks. 
====Raze====
Destroys a portion (~5%) of the target's Land. In War, this attack only destroys ~30% Buildings.
====Conquest====
Base gains are 6.8% land for a full hit, Gains are decreased in proportion to the relative Offense sent vs. target's Defense. Available only within 5% Net Worth range outside Hostile/War, unless attacker has access to Enhanced Conquest.
====Massacre====
Base gains are 9.5% peasants, 7.5% Thieves and 5% Wizards. Efficiency increased roughly 3x during War.
==Military Casualties==
Base Military Casualties are 6.5-8.5% on Offense, 5-6.5% on Defense. This variation is before modifiers and what influences it has not been declared, it may be random. 
Modifier 	Type 	Effect
Relative KD Networth (Defender)	Defensive Military Casualties 	Varies
Building: Hospitals 	All Military Casualties 	Varies
Science: Resilience 	All Military Casualties 	Varies
Multi-Attack Protection 	Military Casualties 	Varies
Attack: Learn 	Defensive Military Casualties 	-50%
Attack: Plunder 	Defensive Military Casualties 	-50%
Personality: Cleric 	All Military Casualties 	-30%
Ritual: Stalwart 	All Military Casualties 	-20%
Ritual: Onslaught 	Offensive Military Casualties inflicted 	+15%
Spell: Pitfalls 	Defensive Military Casualties 	+15%
Spell: Bloodlust 	Offensive Military Casualties inflicted, self casualties	+15%
Spell: Salvation 	All Military Casualties 	-15%
Spell: Wrath 	Enemy Military Casualties 	+20%
Operation: Bribe Generals 	All Military Casualties 	20% chance for +15%
Emerald Dragon 	All Military Casualties 	+20%
Stance: Peaceful 	Defensive Military Casualties 	-20%
Stance: Aggressive 	Offensive Military Casualties 	+10%
History of attacking