136 NPC.savedBartender =
false;
250 NPC.totalInvasionPoints = 0f;
281 NPC.totalInvasionPoints = 0f;
347 NPC.waveKills += num;
348 NPC.totalInvasionPoints += num;
374 string key =
"DungeonDefenders2.WaveComplete";
377 key =
"DungeonDefenders2.WaveCompleteFirst";
467 Main.
npc[num].netUpdate =
true;
468 for (
int i = 0; i < 200; i++)
560 point.X -= tileSafely.frameX / 18 * 16;
561 point.Y -= tileSafely.frameY / 18 * 16;
574 int num = xRightEnd.X - x;
576 if (num < 60 ||
num2 < 60)
610 for (
int i = 0; i < 1000; i++)
621 for (
int i = 0; i < 200; i++)
636 for (
int i = 0; i < 400; i++)
639 if (item.active && item.type == 3822)
657 for (
int i = 0; i < 8000; i++)
664 for (
int j = 0;
j < 40;
j++)
718 origin.X +=
Main.
rand.Next(-15, 16);
723 NPC.
NewNPC(
caller.GetSpawnSourceForNPCFromNPCAI(), result.X * 16 + 8, result.Y * 16, 567);
727 NPC.
NewNPC(
caller.GetSpawnSourceForNPCFromNPCAI(), result.X * 16 + 8, result.Y * 16, 566);
747 for (
int i = 0; i < 200; i++)
750 if (
nPC.active && (
nPC.type == 549 ||
nPC.type == 548))
776 ArenaHitbox.X = (int)
vector.X;
777 ArenaHitbox.Y = (int)
vector.Y;
778 ArenaHitbox.Width = (int)
vector4.X;
779 ArenaHitbox.Height = (int)
vector4.Y;
789 for (
int i = 0; i < 200; i++)
905 position =
Main.
npc[num].Center;
914 for (
int i = 0; i < 200; i++)
918 for (
int j = 0;
j < 5;
j++)
943 return new short[1] { 552 };
945 return new short[2] { 552, 555 };
948 return new short[3] { 552, 555, 561 };
951 return new short[4] { 552, 555, 561, 558 };
954 return new short[5] { 552, 555, 561, 558, 564 };
956 return new short[1] { 552 };
1015 num = (int)((
double)num * 1.3);
1122 return new short[2] { 553, 562 };
1125 return new short[3] { 553, 562, 572 };
1127 return new short[5] { 553, 556, 562, 559, 572 };
1130 return new short[5] { 553, 559, 570, 572, 562 };
1133 return new short[6] { 553, 556, 559, 572, 574, 570 };
1136 return new short[8] { 553, 556, 562, 559, 568, 570, 572, 574 };
1139 return new short[8] { 553, 556, 572, 559, 568, 574, 570, 576 };
1141 return new short[1] { 553 };
1244 num = (int)((
double)num * 1.3);
1246 num5 = (int)((
double)num * 1.3);
1247 num6 = (int)((
double)num * 1.35);
1427 return new short[3] { 554, 557, 563 };
1430 return new short[5] { 554, 557, 563, 573, 578 };
1433 return new short[5] { 554, 563, 560, 573, 571 };
1436 return new short[7] { 554, 560, 571, 573, 563, 575, 565 };
1439 return new short[7] { 554, 557, 573, 575, 571, 569, 577 };
1442 return new short[8] { 554, 557, 563, 578, 569, 571, 577, 565 };
1445 return new short[6] { 554, 557, 563, 569, 571, 551 };
1447 return new short[1] { 554 };
1554 num = (int)((
double)num * 1.3);
1556 num5 = (int)((
double)num * 1.3);
1557 num6 = (int)((
double)num * 1.35);
1751 for (
int i = 0; i < 200; i++)
1754 if (
nPC !=
null &&
nPC.active &&
nPC.type == 548)
1756 return nPC.Bottom.Distance(target) < 36f;
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
virtual bool ReadBoolean()
static void PlaySound(int type, Vector2 position, int style=1)
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
static List< int > GetCurrentlyOpenChests()
static Tile GetTileSafely(Vector2 position)
static void NotifyProgressionEvent(int eventID)
static bool DownedInvasionAnyDifficulty
static bool DownedInvasionT3
static readonly Color INFO_FAILURE_INVASION_COLOR
static void StartVictoryScene()
static int _timeLeftUntilSpawningBegins
static short[] Difficulty_2_GetEnemiesForWave(int wave)
static int _crystalsDropping_toDrop
static readonly Color INFO_NEW_WAVE_COLOR
static bool ReadyForTier2
static int Difficulty_2_GetMonsterPointsWorth(int slainMonsterID)
static int TimeLeftBetweenWaves
static bool _downedOgreT2
static void GetInvasionStatus(out int currentWave, out int requiredKillCount, out int currentKillCount, bool currentlyInCheckProgress=false)
static bool WouldFailSpawningHere(int x, int y)
static void SetEnemySpawningOnHold(int forHowLong)
static void ClearAllDD2EnergyCrystalsInGame()
static short[] Difficulty_1_GetEnemiesForWave(int wave)
static void SpawnMonsterFromGate(Vector2 gateBottom)
static bool EnemiesShouldChasePlayers
static bool ShouldBlockBuilding(Vector2 worldPosition)
static void SummonCrystal(int x, int y, int whoAsks)
static void CheckProgress(int slainMonsterID)
static void ClearAllDD2EnergyCrystalsInChests()
static void WipeEntities()
static int Difficulty_1_GetRequiredWaveKills(ref int waveNumber, ref int currentKillCount, bool currentlyInCheckProgress)
static bool CanRaiseGoblinsHere(Vector2 spot)
static bool DownedInvasionT2
static void SyncInvasionProgress(int toWho)
static void Load(BinaryReader reader, int gameVersionNumber)
static int GetMonsterPointsWorth(int slainMonsterID)
static void SummonBetsy()
static int _crystalsDropping_lastWave
static IEntitySource GetSpawnSource_OldOnesArmy()
static bool _spawnedBetsyT3
static bool ReadyForTier3
static bool IsStandActive(int x, int y)
static void FindProperDifficulty()
static void FindArenaHitbox()
static int _arenaHitboxingCooldown
static bool EnemySpawningIsOnHold
static readonly Color INFO_START_INVASION_COLOR
static void Save(BinaryWriter writer)
static void RaiseGoblins(NPC caller, Vector2 spot)
static void ResetProgressEntirely()
static void DropMedals(int numberOfMedals)
static void SummonCrystalDirect(int x, int y, int whoAsks)
static bool ShouldDropCrystals()
static bool ReadyToFindBartender
static List< Vector2 > _deadGoblinSpots
static void RequestToSkipWaitTime(int x, int y)
static void DropStarterCrystals()
static int Difficulty_2_GetRequiredWaveKills(ref int waveNumber, ref int currentKillCount, bool currentlyInCheckProgress)
static bool _downedDarkMageT1
static int _crystalsDropping_alreadyDropped
static void Difficulty_1_SpawnMonsterFromGate(Vector2 gateBottom)
static short[] GetEnemiesForWave(int wave)
static void StopInvasion(bool win=false)
static void Difficulty_3_SpawnMonsterFromGate(Vector2 gateBottom)
static void ReportEventProgress()
static short[] Difficulty_3_GetEnemiesForWave(int wave)
static void FailureMessage(int client)
static void WinInvasionInternal()
static void AttemptToSkipWaitTime()
static void ClearAllTowersInGame()
static void SpawnNPC(ref int newNPC)
static void StartInvasion(int difficultyOverride=-1)
static void LoseInvasionMessage()
static int Difficulty_1_GetMonsterPointsWorth(int slainMonsterID)
static int Difficulty_3_GetMonsterPointsWorth(int slainMonsterID)
static void AnnounceGoblinDeath(NPC n)
static int OngoingDifficulty
static void ClearAllDD2HostilesInGame()
static int Difficulty_3_GetRequiredWaveKills(ref int waveNumber, ref int currentKillCount, bool currentlyInCheckProgress)
static void Difficulty_2_SpawnMonsterFromGate(Vector2 gateBottom)
static Rectangle ArenaHitbox
static bool DownedInvasionT1
static FilterManager Scene
static bool[] BelongsToInvasionOldOnesArmy
static bool[] IsADD2Turret
static readonly LegacySoundStyle NPCDeath7
void TurnToAir(bool fullReset=false)
static int NewItem(IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
static NetworkText GetInvasionWaveText(int wave, params short[] npcIds)
static LocalizedText GetText(string key)
static NetworkText FromKey(string key, params object[] substitutions)
static int ActivePlayersCount
static void ReportInvasionProgress(int progress, int progressMax, int icon, int progressWave)
static void NewText(string newText, byte R=byte.MaxValue, byte G=byte.MaxValue, byte B=byte.MaxValue)
static Projectile[] projectile
static UnifiedRandom rand
static int invasionProgress
static int invasionProgressMax
static int CountNPCS(int Type)
static int FindFirstNPC(int Type)
static bool downedMechBossAny
static float GetBalance()
static bool AnyNPCs(int Type)
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
static void SpawnOnPlayer(int plr, int Type)
static bool downedGolemBoss
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static byte FindClosest(Vector2 Position, int Width, int Height)
static void CheckArenaScore(Vector2 arenaCenter, out Point xLeftEnd, out Point xRightEnd, int walkerWidthInTiles=5, int walkerHeightInTiles=10)
static GenSearch Chain(GenSearch search, params GenCondition[] conditions)
static bool Find(Point origin, GenSearch search, out Point result)
static void BroadcastText(NetworkText text, Vector4 color)
static float DistanceSquared(Vector2 value1, Vector2 value2)