Invader

Invaders are hostile Characters who enter the player's Sect map with nefarious intentions. Some of them aim to steal valuable items, others aim to destroy the sect. 
==Invader Power==
The difficulty of randomly generated Invaders depends on the Reputation of the Sect. The power level caps out at 20, with a Sect Reputation of 250,000XiaWorld.GameDefine.SchoolScore2EnemeyLevel. 
 
Power
Level	Reput. 	Cultivation
Levelnum4 in XiaWorld.Map.CallEnemies, ThingMgr.Instance.CallNpc	Wave
Powernum in XiaWorld.Map.CallEnemies:
Maximum score of invaders per wave, where Primordial Spirit = 4, Golden Core = 3, Core Shaping = 2, Qi Shaping and Outer Disciple = 1	Max.
Supernum3 in XiaWorld.Map.CallEnemies:
Number of "Super Invaders" that have additional bonuses, such as bonus Manuals learned or bonus Max Qi.	Bonus
Manualarray[4] in XiaWorld.Map.CallEnemies:
Maximum number of additional Manuals learned by the Super Invader from their Unorthodox Law. The Super Invader will learn from 1 to N additional manuals.	Bonus
GCQ array[5] in XiaWorld.Map.CallEnemies:
Lines 1860-1863, XiaWorld.ThingMgr.EquptNpc:
Bonus chance that the Golden Core Quality of the Super Enemy increases.
A regular Invader of Golden Core and above has a base Golden Core Quality between 1000 and 20,000. The Invader has a base chance of 40% of randomly increasing the GCQ by 1000 and 20,000. If this roll succeeds, the Invader can repeatedly roll again, until the roll fails. On average, this results in 7000 additional GCQ.
A Super Invader can have this chance boosted to 80%. On average, this results in 42,000 additional GCQ.	Bonus
Max Qiarray[6] in XiaWorld.Map.CallEnemies:
Amount of bonus Base Max Qi applied to the Super Enemy. The Super Enemy receives Age*N additional Base Max Qi.	Cancel Chance
0 	0 	0-0 	1-1 	0	0	0% 	0	0%
1 	200 	0-0 	2-3 	0	0	0% 	0	0%
2 	400 	0-1 	2-2 	0	0	0% 	0	0%
3 	600 	0-2 	2-3 	0	0	0% 	0	0%
4 	800 	1-3 	2-4 	0	0	0% 	0	0%
5 	1000 	2-4 	4-4 	0	0	0% 	0	0%
6 	2000 	3-5 	4-6 	0	0	0% 	0	0%
7 	3000 	4-6 	4-8 	0	0	0% 	0	0%
8 	4000 	5-7 	6-6 	1	1	10%	1	0%
9 	5000 	6-8 	6-9 	1	1	10%	1	0%
10	6000 	7-9 	6-12 	1	1	10%	1	0%
11	10,000 	8-10 	8-8 	1	1	10%	2	7%
12	15,000 	9-11 	8-12 	1	1	10%	2	14%
13	20,000 	10-12	8-16 	1	1	10%	2	21%
14	25,000 	10-12	10-20	1	1	15%	3	28%
15	40,000 	10-12	15-30	1	1	15%	3	35%
16	80,000 	10-12	15-30	2	1	20%	4	42%
17	120,000	10-12	15-30	2	3	25%	5	49%
18	160,000	10-12	15-30	3	5	30%	6	56%
19	200,000	10-12	15-30	3	7	35%	7	63%
20	250,000	10-12	15-30	3	9	40%	8	70%
==Invader Properties==
===Allegiance===
Invaders may be random bandits without a Sect, random Yaoguai, or from a specific Sect Faction. 
Having high Favor with a Sect decreases the chance of Invaders from the Sect attackingXiaWorld.GameEventMgr.CheckSchoolEvent, Settings\World\Events\SchoolEventList.txt. 
Having high Reputation causes some Invaders to abort an invasion. For every Power Level above 10, there is a 7% chance that the Invaders do not attack. At the maximum Power Level, 70% of Invader events are cancelled due to Reputation.XiaWorld.GameEventMgr.RandomEvent
=== Sect Invaders ===
Each day, the game runs a check between every sect to determine what events will occur between them, including the player sect. By default, there's a 5% chance to potentially roll an event, and each day an inter-sect event doesn't occur, the chance increases by 3% the next day. If the event does occur, the chance resets to 5%, and a new random check is made. 
30% of the time that check passes, information is gathered about the two involved sects and an event occurs. In the case of the player sect, there's a chance for either a "good" event, where a disciple from that sect will visit for some time, or a "bad" event, where some disciples from that sect will invade. The events are binary; one will always occur, and the odds are determined by the sect favor. 
At 0 favor, the chance is 50% for a good or bad event. Each point of favor provides an additional 0.05% towards good or bad, depending on if it's positive or negative; in other words, every ±100 favor counts for 5% towards good or bad. At ±1000 favor, the good or bad event is guaranteed to roll, assuming all other checks pass.
===Law ===
Invaders always practice an Unorthodox Xiandao Law, with the exception of Daemonia Temple Invaders, who are always YaoGuai and always practice Ancestral Yaoguai Body. Invaders from certain Sects may also practice an Unorthodox Law invented by that specific SectXiaWorld.RandomGongMgr. The inventor of the Unorthodox Law has no effect on that Law's properties.
Invaders do not practice any form of Shendao law, or Physical Cultivation laws other than Ancestral Yaoguai Body.
=== Equipment ===
The wealth of invaders, usually governed by the Event that triggers them, affects the quality of their equipmentXiaWorld.ThingMgr.EquptNpc(). Women invaders always have upper clothes while men only do 80% of the time, regardless of their wealth. 
==== Base equipment ====
This is common to all invaders.
Wealth 	items tier and quality 	Weapon	Tool
poorest	T1 of 5-29% quality 	50% 	
poor 	T1 of 20-29% quality 	50% 	
normal 	T1 of 40-59% quality 	50% 	
rich 	T2-T4 of 60-89% quality	100% 	10% (T0-5)
richest	T3-T5 of 80-99% quality	100% 	10% (T0-5)
==== Xiandao equipment ====
Only Xiandao invaders can have those items. 
* 0.1% chance to have a random Fortuitous Treasure equipped (though their wealth dictates its quality and tier) if they are Xiandao.
* Rich and Richest invaders have 1% chance to have a random tier, random effect, talisman between 10-70% quality.
* 30% chance to have a randomly generated Unorthodox Manual equipped of power depending on their strength level.
* 20% chance to have a (possibly 2nd) random tier, random effect, talisman between 10-70% quality.
* One random Artifact with a minimum tier equal to their strength level.
==== Body cultivators ====
See the Body Profundity page.
==Invader Behavior==
===Leaving===
Most Invaders aim to steal from the sect. Therefore, they will only attack your sect for a limited amount of time. If they are not defeated after a while, they will steal a random item not on a Display and leave the map. 
Certain Invaders, most notably the Mysterious Assassin and other invaders generated by Tribulation IX options, have the SetEnemyNeedKill flag set. This means that they will not leave the map, and will continue destroying things until either they are killed or the sect is destroyed. 
=== Attack Delay===
Most Invaders do not immediately attack the Sect once they enter the map. Instead, they wander around for a while at their spawn location before attacking. By default, an Invader will wander for 100 seconds before attackingXiaWorld.Map.AddEnemyAtKey. 
Certain Invaders, such as the invaders generated by Tribulation IX options, Ancient Cultivators, and invaders attacks summoned by Spirit Roots do not wander around, and immediately attack a target close to their spawn point. 
==References ==