//Allow to update invasion while game is running public override void PostUpdate() { if (dungueonInvasionUp) { if (Main.invasionX == (double)Main.spawnTileX) { //Checks progress and reports progress only if invasion at spawn DungueonInvasion.CheckDungueonInvasionProgress(); } //Updates the dungeon invasion while it heads to spawn point and ends it DungueonInvasion.UpdateDungueonInvasion(); } }
public override void NPCLoot(NPC npc) { //When an NPC (from the invasion list) dies, add progress by decreasing size if (MWorld.dungueonInvasionUp) { int[] FullList = DungueonInvasion.GetFullInvaderList(); foreach (int invader in FullList) { if (npc.type == invader) { Main.invasionSize -= 1; } } } }